Commit 6b2cdd44 authored by Pettersson Tomas's avatar Pettersson Tomas

adjusted changefn

parent f36819ac
......@@ -614,10 +614,10 @@ var STWkit;
self.startTimeInput.value = changeCard.obsTimeInput.value;
self.updateFromStartDate();
}
if ((typeof changeCard.to !== 'undefined')) {
if (changeCard.to.isBefore(self.minDate) || changeCard.to.isAfter(self.maxDate))
if ((typeof changeCard.updateto !== 'undefined')) {
if (changeCard.updateto.isBefore(self.minDate) || changeCard.updateto.isAfter(self.maxDate))
return;
self.to = changeCard.to.clone();
self.to = changeCard.updateto.clone();
self.adjustDateToRange();
self.updateSlider();
if (self.ready)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -676,9 +676,9 @@ module STWkit {
self.startTimeInput.value = changeCard.obsTimeInput.value;
self.updateFromStartDate();
}
if ((typeof changeCard.to !== 'undefined')) {
if (changeCard.to.isBefore(self.minDate) || changeCard.to.isAfter(self.maxDate)) return;
self.to = changeCard.to.clone();
if ((typeof changeCard.updateto !== 'undefined')) {
if (changeCard.updateto.isBefore(self.minDate) || changeCard.updateto.isAfter(self.maxDate)) return;
self.to = changeCard.updateto.clone();
self.adjustDateToRange();
self.updateSlider();
if (self.ready) self.validate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment