Skip to content

Commit

Permalink
try 2
Browse files Browse the repository at this point in the history
  • Loading branch information
tischsoic committed Mar 15, 2019
1 parent aff57a6 commit 568557b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
return;
}

const selectedDate = new Date(dates[0]);
const selectedDate = dates[0];
const selectedDateWithUserTimezone = convertDateToTimezone(selectedDate, userTimezone, true);
const timestamp = Math.floor(selectedDateWithUserTimezone.valueOf() / 1000);

Expand All @@ -95,7 +95,7 @@
const sourceInput = field.querySelector(SELECTOR_INPUT);
const flatPickrInput = field.querySelector(SELECTOR_FLATPICKR_INPUT);
const btnClear = field.querySelector('.ez-data-source__btn--clear-input');
// const secondsEnabled = sourceInput.dataset.seconds === '1';
const secondsEnabled = sourceInput.dataset.seconds === '1';
// const formatDate = secondsEnabled ? (date) => date.toLocaleString() : (date) => eZ.helpers.timezone.formatDate(date);
let defaultDate = null;

Expand All @@ -111,7 +111,7 @@
Object.assign({}, datetimeConfig, {
onChange: updateInputValue.bind(null, sourceInput),
defaultDate,
enableSeconds: !!parseInt(sourceInput.dataset.seconds, 10),
enableSeconds: secondsEnabled,
// formatDate,
})
);
Expand Down

0 comments on commit 568557b

Please sign in to comment.