Commit 1e9e0747 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

obsdate fixes

parent ea05d579
...@@ -589,9 +589,9 @@ var STWkit; ...@@ -589,9 +589,9 @@ var STWkit;
PeriodCard.prototype.changeFn = function (changeCard) { PeriodCard.prototype.changeFn = function (changeCard) {
var self = this; var self = this;
if ((typeof changeCard.obsDateInput !== 'undefined') && (typeof changeCard.obsTimeInput !== 'undefined')) { if ((typeof changeCard.obsDateInput !== 'undefined') && (typeof changeCard.obsTimeInput !== 'undefined')) {
self.obsdate = moment.utc(changeCard.obsDateInput.value + ' ' + changeCard.obsTimeInput.value, self.datetimeFormat); self.startDateInput = changeCard.obsDateInput.value;
if (document.body.contains(self.forwardButton)) self.startTimeInput = changeCard.obsTimeInput.value;
self.forwardButton.click(); self.updateFromStartDate();
} }
}; };
PeriodCard.prototype.isDateValid = function (date) { PeriodCard.prototype.isDateValid = function (date) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -470,7 +470,6 @@ module STWkit { ...@@ -470,7 +470,6 @@ module STWkit {
public domain: string; public domain: string;
public forcingmodel: string; public forcingmodel: string;
public ready: boolean; public ready: boolean;
public obsdate: any;
constructor(id, title, parentDiv, lang, map, domain, forcingmodel, options?) { constructor(id, title, parentDiv, lang, map, domain, forcingmodel, options?) {
...@@ -652,8 +651,9 @@ module STWkit { ...@@ -652,8 +651,9 @@ module STWkit {
public changeFn(changeCard) { public changeFn(changeCard) {
var self = this; var self = this;
if ((typeof changeCard.obsDateInput !== 'undefined') && (typeof changeCard.obsTimeInput !== 'undefined')) { if ((typeof changeCard.obsDateInput !== 'undefined') && (typeof changeCard.obsTimeInput !== 'undefined')) {
self.obsdate = moment.utc(changeCard.obsDateInput.value + ' ' + changeCard.obsTimeInput.value, self.datetimeFormat); self.startDateInput = changeCard.obsDateInput.value;
if (document.body.contains(self.forwardButton)) self.forwardButton.click(); self.startTimeInput = changeCard.obsTimeInput.value;
self.updateFromStartDate();
} }
} }
......
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