Bootstrap datepicker and bootstrap validator

后端 未结 6 508
遇见更好的自我
遇见更好的自我 2020-12-19 09:07

I am using the bootstrap datepicker from here and the bootstrap validator from here. Also I am using bootstrap v3.1.1.

After selecting a date from datepicker the va

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-19 09:48

    For most of cases answers above should work, but if eventually anythose answers ain't working for you, could try this too:

    $('.datepicker').change(function () {
            $(this).focus();
            $(this).blur();
        });
    

    Main idea in this script is to force validations by "setting" and after "unsetting" the focus. I understand that would be similar to emulate the normal events that permit to run validations.

    Good luck!

提交回复
热议问题