Hello,
How to make time selection at Start and End, always showing?
note:
For for view mode other than Month, the showing of time selection is default behavior because we can create new appointment at what time. But the story is different when the view is Month view, when we create new appointment, the default is IsAllDay == true, so the time selection is not showing. I have hide the option All Day to make All Day appointment false is default and user don't have to select it from the UI.
I hope my question is clear enough.
Thanks in advance
best regards,
Ismail
popupOpen: function(args) {
if (args.type == 'Editor' && scheduleObj.currentView == 'Month' && !args.target.classList.contains("e-appointment")) {
args.element.querySelectorAll('.e-time-icon')[1].classList.remove('e-icon-disable');
args.element.querySelectorAll('.e-time-icon')[0].classList.remove('e-icon-disable');
args.element.querySelector('.e-time-zone-container').classList.remove('e-disable');
args.element.querySelector('.e-start').ej2_instances[0].format = "M/d/yy h:mm a";
args.element.querySelector('.e-end').ej2_instances[0].format = "M/d/yy h:mm a";
args.element.querySelector('.e-start').ej2_instances[0].value.setHours(9, 0, 0);
args.element.querySelector('.e-end').ej2_instances[0].value.setHours(9, 30, 0);
args.element.querySelector('.e-start').ej2_instances[0].dataBind();
args.element.querySelector('.e-all-day.e-checkbox').ej2_instances[0].checked = false;
}
} |
Hello Praveen,
Thank you for your update. I have found another solution, that is by settings the args.data.IsAllDay = false at popupOpen. Please check my code below, is it ok?
note:
so far is working perfectly.
popupOpen: (args) => {
var guid = args.data.Guid;
if (args.name === 'popupOpen' && (args.type === 'Editor' || args.type === 'QuickInfo') && ej.base.isNullOrUndefined(guid)) {
args.data.IsAllDay = false;
}
Best regards,
Ismail