PDA

View Full Version : [SOLVED]make the calendar appear when double clicking on a DateField and select a dat



flamant
24 Nov 2010, 8:23 AM
Hi,
I have a date field for which I hide the trigger (hideTrigger = true)

I want to manage a double click on the date field to make the calendar appear (just like if I was clicking on the trigger) and then select a date in the calendar

Nothing is schedule for that in the API

Thank you in advance for your answers

flamant
24 Nov 2010, 9:26 AM
I found the solution :



afterrender : function(dateField) {
var elt = dateField.getEl();
elt.field = dateField;
elt.on('dblclick', function(evt, elRef) {
var field = this.field;
field.onTriggerClick();
})
}

mschwartz
24 Nov 2010, 11:02 AM
If you set editable: false in the date field config, doesn't the date picker pop up on one click? Is that sufficient?

flamant
25 Nov 2010, 12:47 AM
Hi mschwartz and thank you for your answer

yes indeed it is another solution but my boss wants the date picker pop up on dblclick