Skip to content

Commit

Permalink
Merge pull request django-oscar#2105 from sasha0/issues/2104/datetime…
Browse files Browse the repository at this point in the history
…picker_seconds

Default datetime picker in the dashboard to zero seconds.
  • Loading branch information
Alexander Gaevsky committed Aug 21, 2016
2 parents 62014cf + c5a7594 commit f47af3b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/oscar/static/oscar/js/oscar/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var oscar = (function(o, $) {
'timeFormat': 'hh:ii',
'datetimeFormat': 'yy-mm-dd hh:ii',
'stepMinute': 15,
'initialDate': new Date(new Date().setSeconds(0)),
'tinyConfig': {
entity_encoding: 'raw',
statusbar: false,
Expand Down Expand Up @@ -155,7 +156,8 @@ var oscar = (function(o, $) {
'format': o.dashboard.options.datetimeFormat,
'minuteStep': o.dashboard.options.stepMinute,
'autoclose': true,
'language': o.dashboard.options.languageCode
'language': o.dashboard.options.languageCode,
'initialDate': o.dashboard.options.initialDate
};
$datetimes = $(el).find('[data-oscarWidget="datetime"]').not('.no-widget-init').not('.no-widget-init *')
$datetimes.each(function(ind, ele) {
Expand All @@ -171,7 +173,8 @@ var oscar = (function(o, $) {
'format': o.dashboard.options.timeFormat,
'minuteStep': o.dashboard.options.stepMinute,
'autoclose': true,
'language': o.dashboard.options.languageCode
'language': o.dashboard.options.languageCode,
'initialDate': o.dashboard.options.initialDate
};
$times = $(el).find('[data-oscarWidget="time"]').not('.no-widget-init').not('.no-widget-init *')
$times.each(function(ind, ele) {
Expand Down

0 comments on commit f47af3b

Please sign in to comment.