checkBirhdayAndApplicationDate: function () { jQuery('#Candidates_editView_fieldName_date_of_birth').on('change',function (e) { jQuery('#testBirthday').text(''); var birthdayDateString = jQuery('#Candidates_editView_fieldName_date_of_birth').val(); var birthdayDate = new Date( birthdayDateString.replace( /(\d{2})-(\d{2})-(\d{4})/, "$2/$1/$3") ); var today = new Date(); var birthday_int = Date.parse(birthdayDate); var today_int = Date.parse(today); if (birthday_int > today_int) { jQuery('#testBirthday').text('You can not enter Birthday date in the future!.'); } }); // jQuery('#Candidates_editView_fieldName_application_date').on('change',function (e) { // jQuery('#testApplicationDate').text(''); // var applicationDateString = jQuery('#Candidates_editView_fieldName_application_date').val(); // var applicationDate = new Date(applicationDateString); // var today = new Date(); // if (applicationDate == 'Invalid Date') { // jQuery('#testApplicationDate').text('You cannot enter a Application date in the future!.'); // } // if (applicationDate > today) { // jQuery('#testApplicationDate').text('You cannot enter a Application date in the future!.'); // } // }); // jQuery('#Candidates_editView_fieldName_mip_swork').on('change',function (e) { // jQuery('#testStartWorkDate').text(''); // var startWorkDateString = jQuery('#Candidates_editView_fieldName_mip_swork').val(); // var startWorkDate = new Date(startWorkDateString); // var today = new Date(); // if (startWorkDate == 'Invalid Date') { // jQuery('#testStartWorkDate').text('You cannot enter a Application date in the future!.'); // } // if (startWorkDate > today) { // jQuery('#testStartWorkDate').text('You cannot enter a Application date in the future!.'); // } // });},
Comments
Post a Comment