Server IP : 103.53.40.154 / Your IP : 3.144.2.5 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/ppcad7no/bethepolice.in/admin/../../vivahmilankendra.com/hom-slider/../js/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
$('.dropdown-el').click(function(e) { e.preventDefault(); e.stopPropagation(); $(this).toggleClass('expanded'); $('#'+$(e.target).attr('for')).prop('checked',true); }); $(document).click(function() { $('.dropdown-el').removeClass('expanded'); }); $(function () { var bindDatePicker = function() { $(".date").datetimepicker({ format:'YYYY-MM-DD', icons: { time: "fa fa-clock-o", date: "fa fa-calendar", up: "fa fa-arrow-up", down: "fa fa-arrow-down" } }).find('input:first').on("blur",function () { // check if the date is correct. We can accept dd-mm-yyyy and yyyy-mm-dd. // update the format if it's yyyy-mm-dd var date = parseDate($(this).val()); if (! isValidDate(date)) { //create date based on momentjs (we have that) date = moment().format('YYYY-MM-DD'); } $(this).val(date); }); } var isValidDate = function(value, format) { format = format || false; // lets parse the date to the best of our knowledge if (format) { value = parseDate(value); } var timestamp = Date.parse(value); return isNaN(timestamp) === false; } var parseDate = function(value) { var m = value.match(/^(\d{1,2})(\/|-)?(\d{1,2})(\/|-)?(\d{4})$/); if (m) value = m[5] + '-' + ("00" + m[3]).slice(-2) + '-' + ("00" + m[1]).slice(-2); return value; } bindDatePicker(); });