PDA

View Full Version : DatePicker double click event



Albareto
18 Jan 2011, 7:28 AM
Hi there,

I have searched for this in the Internet for a while but I cannot get anything that helps me.

I am trying to use the DatePicker in a current in use html form. For representing dates in the application we use three input fields, year, month and day and then an image that when clicked opens the DatePicker, I would like to add the date only when a day is double clicked but I have not seen a way of doing this. Of course I can use the select event but this is not what we want. Do anyone know how to achive this?

Thanks in advance for any given help.

P.S.: The logic for setting the date into the input fields is already built and is working for the select event

Condor
18 Jan 2011, 7:39 AM
You'll have to override Ext.DatePicker.onRender and change 'click' to 'dblclick'.

SurenderBhyan1
6 Dec 2015, 11:31 PM
You'll have to override Ext.DatePicker.onRender and change 'click' to 'dblclick'.

Hi Condor,

Thanks for the override suggestion.

Please help me out here I have two datefield (startData and stopDate). Click event is working as expected and want to be same in future. Additionally, now my requirement is double-clicking on the 'Start Date' date selector must enters the same date in both the 'Start Date' field and the 'Stop Date' field.

I have written override suggested by you for a simple console message but control is not going in "handleDateDblClick" function as Click event got fired first and then control breaks.

I am using Extjs 4.2.1 & Chrome 47, Please have a look at below sample fiddle


125n