DateTimePicker icon indicating copy to clipboard operation
DateTimePicker copied to clipboard

Any Way to get the ID of the input field clicked?

Open mooseindia opened this issue 8 years ago • 5 comments

Hi,

Am trying to put multiple Pickers on my page on click of button. I wanted to know if there is any way i can find out id of input field clicked.

mooseindia avatar Mar 15 '16 11:03 mooseindia

You can use beforeShow callback function with oInputElement as an argument and get id with $(oInputElement).attr("id").

Refer demo/Callback-beforeShow.htm

nehakadam avatar Mar 15 '16 16:03 nehakadam

Hi I am using "formatDateTimeString" call back function as follows to find out id of input field clicked as i am using multiple date pickers with different id's.

formatDateTimeString: function(oDate, sMode,$oElem) {
console.log($oElem); }

Please let me know if I can get the id through above call back function.

lalitha123 avatar Apr 25 '16 05:04 lalitha123

Hi,

Now you will be able get "id" of the element.

formatDateTimeString: function(oDate, sMode, oElem)
{
    console.log($(oElem)attr("id"));
}

nehakadam avatar Apr 25 '16 15:04 nehakadam

Hi

I have set the dateTimeFormat property to 'dd-MM-yyyy hh:mm AA' but the datetime picker is allowing the past time also.

Can you please suggest me to time should not allow the past time from current time?

lalitha123 avatar May 09 '16 09:05 lalitha123

You can set minDateTime to achieve that. Go through Example.

nehakadam avatar May 09 '16 15:05 nehakadam