Skip to content

Commit 5c2a936

Browse files
author
Dmytro Voskoboinikov
committed
MAGETWO-59106: Datepicker resets time to 12:00 AM
1 parent 0cb8b17 commit 5c2a936

File tree

1 file changed

+6
-1
lines changed
  • app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings

1 file changed

+6
-1
lines changed

app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/datepicker.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ define([
5151

5252
observable() && $(el).datepicker(
5353
'setDate',
54-
moment(observable(), utils.normalizeDate(config.options.dateFormat)).toDate()
54+
moment(
55+
observable(),
56+
utils.normalizeDate(
57+
options.dateFormat + (options.showsTime ? ' ' + options.timeFormat : '')
58+
)
59+
).toDate()
5560
);
5661

5762
$(el).blur();

0 commit comments

Comments
 (0)