Merge pull request #68 from digital-gnome/montagereview-datepicker

Montagereview datepicker
This commit is contained in:
Isaac Connor 2017-12-18 13:39:58 -05:00 committed by GitHub
commit 46673bafdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 2 deletions

View File

@ -765,6 +765,27 @@ function initPage() {
//setFit(fitMode); // will redraw
//setLive(liveMode); // will redraw
redrawScreen();
$j('#minTime').datetimepicker({
timeFormat: "HH:mm:ss",
dateFormat: "yy-mm-dd",
maxDate: +0,
onClose: function (newDate, oldData) {
if (newDate !== oldData.lastVal) {
changeDateTime();
}
}
});
$j('#maxTime').datetimepicker({
timeFormat: "HH:mm:ss",
dateFormat: "yy-mm-dd",
minDate: $j('#minTime').val(),
maxDate: +0,
onClose: function (newDate, oldData) {
if (newDate !== oldData.lastVal) {
changeDateTime();
}
}
});
}
window.addEventListener("resize",redrawScreen);
// Kick everything off

View File

@ -219,8 +219,8 @@ xhtmlHeaders(__FILE__, translate('MontageReview') );
<div id="header">
<?php echo $filter_bar ?>
<div id="DateTimeDiv">
<input type="datetime-local" name="minTime" id="minTime" value="<?php echo preg_replace('/ /', 'T', $minTime ) ?>" onchange="changeDateTime(this);"> to
<input type="datetime-local" name="maxTime" id="maxTime" value="<?php echo preg_replace('/ /', 'T', $maxTime ) ?>" onchange="changeDateTime(this);">
<input type="text" name="minTime" id="minTime" value="<?php echo preg_replace('/T/', ' ', $minTime ) ?>"> to
<input type="text" name="maxTime" id="maxTime" value="<?php echo preg_replace('/T/', ' ', $maxTime ) ?>">
</div>
<div id="ScaleDiv">
<label for="scaleslider"><?php echo translate('Scale')?></label>