summaryrefslogtreecommitdiffstats
path: root/client/lib
diff options
context:
space:
mode:
authorSam X. Chen <sam.xi.chen@gmail.com>2019-09-26 10:53:40 -0400
committerSam X. Chen <sam.xi.chen@gmail.com>2019-09-26 10:53:40 -0400
commit62b72a03c4889377169411c8cdbf372c71cac1af (patch)
tree5328397ddf7ae571038ffe5d201fb2d77eadf742 /client/lib
parentd5cff1ec48bf9ab13a32576e7495ae54c3d2c0f7 (diff)
downloadwekan-62b72a03c4889377169411c8cdbf372c71cac1af.tar.gz
wekan-62b72a03c4889377169411c8cdbf372c71cac1af.tar.bz2
wekan-62b72a03c4889377169411c8cdbf372c71cac1af.zip
Add feature: Add due timeline into Calendar view
Diffstat (limited to 'client/lib')
-rw-r--r--client/lib/datepicker.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/lib/datepicker.js b/client/lib/datepicker.js
index eb5b60b8..da44bbc5 100644
--- a/client/lib/datepicker.js
+++ b/client/lib/datepicker.js
@@ -21,7 +21,15 @@ DatePicker = BlazeComponent.extendComponent({
function(evt) {
this.find('#date').value = moment(evt.date).format('L');
this.error.set('');
- this.find('#time').focus();
+ const timeInput = this.find('#time');
+ timeInput.focus();
+ if (!timeInput.value) {
+ const currentHour = evt.date.getHours();
+ const defaultMoment = moment(
+ currentHour > 0 ? evt.date : '1970-01-01 08:00:00',
+ ); // default to 8:00 am local time
+ timeInput.value = defaultMoment.format('LT');
+ }
}.bind(this),
);