| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bzend/public/js/ |
Upload File : |
/**
* @author : Ranvir Singh
* @Created : 01 Sep 2016
* @Updated : 23 Sep 2016
* This file is used for all insurance functions
*/
$(function() {
$.validator.setDefaults({
/*OBSERVATION (1): note the options used for "ignore"*/
ignore: ':not(select:hidden, input:visible, textarea:visible)',
/*...other options omitted to focus on the OP...*/
});
$("#addStateForm").validate({
ignore: '*:not([name])',
// debug: true,
highlight: function (error, element) {
var name = $(element).attr("name");
$("input[name=" + name + "]").removeClass('error');
},
ignore: [],
rules : {
'countryId' : {required : true},
'regionList' : {required : true},
'Title' : {required : true}
},
messages : {
countryId : "Please select Country",
Title : "Please fill State",
regionList : "Please select region",
}
});
$('.datePickerOnly').datetimepicker({
format:'Y-m-d',
timepicker:false,
minDate: 0
});
// var strDepartureDate = new Date($('#oneway_departure_date').val());
// alert(strDepartureDate)
$('.datePickerOnly').datetimepicker({
format:'Y-m-d',
onShow:function( ct ){ //alert(ct)
var day = ct.getDate(); // month (in integer 0-11)
// var month = ct.getMonth() + 1; // month (in integer 0-11) // not allow to select previous date from current
var month = ct.getMonth(); // month (in integer 0-11)
var year = ct.getFullYear(); // year
this.setOptions({
minDate:year+"/"+month+"/"+day
})
},
timepicker:false
});
}); // jquery