HEX
Server: Apache/2.4.25 (Debian)
System: Linux server17 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
User: web37 (1062)
PHP: 7.4.30
Disabled: show_source, highlight_file, apache_child_terminate, apache_get_modules, apache_note, apache_setenv, virtual, dl, disk_total_space, posix_getpwnam, posix_getpwuid, posix_mkfifo, posix_mknod, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_nice, openlog, syslog, pfsockopen
Upload Files
File: /var/www/web37/htdocs/lovetalk/admin/templates/common/date-picker.php
<div id="analytics-dates" class="date-picker">
	<div class="input-wrapper border border-mute-light">
		<input type="text" id="from" class="border border-mute-light background-transparent" />	
		<span class="fa fa-calendar"></span>
	</div>
	<div class="input-wrapper border border-mute-light">
		<input type="text" id="to" class="border border-mute-light background-transparent" />
		<span class="fa fa-calendar"></span>
	</div>
</div>
<script>
	// Init the datepicker fields
	x5engine.boot.push(function() {
		var from = x5engine.imDatePicker( $("#from"), {
			"icon"       : false,
			"date"       : new Date(<?php echo isset($_GET['from']) ? $_GET['from'] : date("U", strtotime("-1 month")) . " * 1000" ?>),
			"setInitial" : true,
			"onChange"   : function () {
				if (from.date() < to.date()) {
					location.href="<?php echo $baseUrl ?>from=" + from.date().getTime() + "&to=" + to.date().getTime();
				}
			}
		});
		var to = x5engine.imDatePicker( $("#to"), {
			"icon"       : false,
			"date"       : new Date(<?php echo isset($_GET['to']) ? $_GET['to'] : "" ?>),
			"setInitial" : true,
			"onChange"   : function () {
				if (to.date() > from.date()) { 
					location.href="<?php echo $baseUrl ?>from=" + from.date().getTime() + "&to=" + to.date().getTime();
				}
			}
		});
	});
</script>