We want to open the date and time (column type = 'datetimefield') calendar on the click of the column instead of a click on the icon.
Can you please guide me on how we will implement that?
Thanks
Re: [VUE] On click on column open date time calendar
Posted: Wed Jun 02, 2021 3:05 pm
by pmiklashevich
Please clarify your question. There is no column type 'datetimefield'. But you can set datetimefield as an editor to the date column, for example.
{ text : 'Date', field : 'start', flex : 1, type : 'date', format : 'MMMM D YYYY', editor : 'datetimefield' },
By default to open a date picker you need to perform 2 clicks: first click on the cell to enter to editing mode, then click on a picker (date picker or time picker ) icon to open corresponding picker. Do you want to auto-expand the date picker on cell click?
Снимок экрана 2021-06-02 в 16.00.38.png (76.77 KiB) Viewed 1057 times
Re: [VUE] On click on column open date time calendar
Posted: Wed Jun 02, 2021 3:18 pm
by Webethics
Yes, I want to auto-expand the date picker and time picker on cell click
Re: [VUE] On click on column open date time calendar
Posted: Wed Jun 02, 2021 4:32 pm
by pmiklashevich
You can implement it, for example:
new Grid({
listeners : {
startCellEdit({ editorContext }) {
const { inputField } = editorContext.editor;
if (inputField.type === 'datetimefield') {
inputField.dateField.showPicker(true); // true to focus the picker
}
}
},
It only opens a date picker but we want to auto expand the date and time picker on cell click.
Has it possible?
Re: [VUE] On click on column open date time calendar
Posted: Thu Jun 03, 2021 4:39 pm
by pmiklashevich
It's not supported out of the box. You can try to extend DateTimeField widget and implement the behaviour you need. Or create a new widget to be used as an editor. We can help you in scope of professional services. Please check out: https://www.bryntum.com/services/