From d57e1248d14721a0f4cf1b3bf20bae86537414f1 Mon Sep 17 00:00:00 2001 From: Holger Amann Date: Thu, 23 May 2013 12:30:55 +0200 Subject: [PATCH] initial time value is only set if the value was not set before --- public/js/selectdate.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/js/selectdate.js b/public/js/selectdate.js index f238896..fe4fb73 100644 --- a/public/js/selectdate.js +++ b/public/js/selectdate.js @@ -36,7 +36,10 @@ function getURLParameter(name) { function setDestinationDate(srcDateBox, destDateBox, dateText) { - if (destDateBox.val() == destDateBox.prop("defaultValue")) + if(isNaN(Date.parse(dateText.replace(/-/g,'/')))) + return; + + if (destDateBox.val() == 'from' || destDateBox.val() == 'until') destDateBox.val(dateText); else { var startDate = $('#dt_from').datetimepicker('getDate');