jQuery datepicker validation message issue

前端 未结 2 648
隐瞒了意图╮
隐瞒了意图╮ 2020-12-05 15:52

I\'m using the jquery datepicker plugin at http://plugins.jquery.com/project/datepick with the datepicker validation plugin.



        
相关标签:
2条回答
  • 2020-12-05 16:46

    You want to set this in your datepicker defaults:

    onClose: function() {$(this).valid();},
    

    As soon as another date is selected it will make the validator plugin recheck the field.

    0 讨论(0)
  • 2020-12-05 16:49

    The "best answer" didn't work for me. I figured out that the validator was validating the date format even though I didn't ask it to. Here's my solution:

    $('form').validate(
        rules:
        {
            MyDateControl:{
                required:true,
                date:false
            }
        }
    );
    
    0 讨论(0)
提交回复
热议问题