mirror of
https://github.com/wekan/wekan.git
synced 2025-12-29 21:58:49 +01:00
Add feature: Add due timeline into Calendar view
This commit is contained in:
parent
d5cff1ec48
commit
62b72a03c4
6 changed files with 62 additions and 23 deletions
|
|
@ -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),
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue