|
|
@@ -160,10 +160,9 @@ $(document).ready(function() {
|
|
|
$('#datetimePicker')
|
|
|
.on('dp.change dp.show', function(e) {
|
|
|
// Validate the date when user change it
|
|
|
- $('#defaultForm')
|
|
|
- .data('bootstrapValidator') // Get the bootstrapValidator instance
|
|
|
- .updateStatus('datetimePicker', 'NOT_VALIDATED', null) // Mark the field as not validated, so it'll be re-validated when the user change date
|
|
|
- .validateField('datetimePicker'); // Validate the field
|
|
|
+ $('#defaultForm').data('bootstrapValidator').revalidateField('datetimePicker');
|
|
|
+ // You also can call it as following:
|
|
|
+ // $('#defaultForm').bootstrapValidator('revalidateField', 'datetimePicker');
|
|
|
});
|
|
|
});
|
|
|
</script>
|