Calendar fields without DatePicker

Hi,

Is there a way to hide the DatePicker from a Calendar/CalendarA grid field or prevent it opening at all?

I have added a mask to the editor when in state 1, so I would like the DatePicker to not appear, since the idea is that the user type in the date instead of selecting it, due to the fact that the user will be using the keyboard and not so much the mouse.

What would be the best approach here?

You may block calendar pop-up blocking the edit operations for the calendar cell/column using the onEditCell event:
docs.dhtmlx.com/api__dhtmlxgrid_ … event.html
for example:

grid.attachEvent("onEditCell", function(stage,rId,cInd,nValue,oValue){ if (stage==0 && cInd==calendar_index){ return false } return true });

Yeah OK this does in fact prevent the DataPicker from appearing, but it also prevent the editor (for the input field itself) from appearing, so the date field cannot be updated or go into edit mode at all.

So this solution isn’t really a solution - I guess I wasn’t clear enough in my description hehe :smiley:

I would still like to be able to actually update the input field, I just don’t want the DatePicker because it takes focus away from the input field, which is bad if the users are primarily navigating with the keyboard.

I would like the field to go into edit mode as if it was of type “ed”, then my mask will do the rest.

The reason I’m not just using type “ed” is because of the formatting capabilities of the calendar type.

I think I found the solution now myself with the onEditCell event…

[code]var type = mygrid.getColType(cInd);

if (stage == 1)
{
if (mygrid.editor != null)
{
if (type == “dhxCalendarA” || type == “dhxCalendar”)
{
$(’.dhtmlxcalendar_dhx_web’).css({ “visibility”: “hidden”, “display”: “none” });
}
$(this.editor.obj).focus();
}
}[/code]