Server IP : 150.95.80.236 / Your IP : 3.136.236.17 Web Server : Apache System : Linux host-150-95-80-236 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : social-telecare ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/pcu.in.th/uat.pcu.in.th/demo15/src/js/custom/documentation/forms/ |
Upload File : |
"use strict"; // Class definition var KTFormsDaterangepickerDemos = function() { // Private functions var example1 = function(element) { $("#kt_daterangepicker_1").daterangepicker(); } var example2 = function(element) { $("#kt_daterangepicker_2").daterangepicker({ timePicker: true, startDate: moment().startOf("hour"), endDate: moment().startOf("hour").add(32, "hour"), locale: { format: "M/DD hh:mm A" } }); } var example3 = function(element) { $("#kt_daterangepicker_3").daterangepicker({ singleDatePicker: true, showDropdowns: true, minYear: 1901, maxYear: parseInt(moment().format("YYYY"),10) }, function(start, end, label) { var years = moment().diff(start, "years"); alert("You are " + years + " years old!"); } ); } var example4 = function(element) { var start = moment().subtract(29, "days"); var end = moment(); function cb(start, end) { $("#kt_daterangepicker_4").html(start.format("MMMM D, YYYY") + " - " + end.format("MMMM D, YYYY")); } $("#kt_daterangepicker_4").daterangepicker({ startDate: start, endDate: end, ranges: { "Today": [moment(), moment()], "Yesterday": [moment().subtract(1, "days"), moment().subtract(1, "days")], "Last 7 Days": [moment().subtract(6, "days"), moment()], "Last 30 Days": [moment().subtract(29, "days"), moment()], "This Month": [moment().startOf("month"), moment().endOf("month")], "Last Month": [moment().subtract(1, "month").startOf("month"), moment().subtract(1, "month").endOf("month")] } }, cb); cb(start, end); } var example5 = function(element) { $("#kt_daterangepicker_5").daterangepicker(); } return { // Public Functions init: function(element) { example1(); example2(); example3(); example4(); example5(); } }; }(); // On document ready KTUtil.onDOMContentLoaded(function() { KTFormsDaterangepickerDemos.init(); });