[Vtigercrm-developers] datepicker question...

Alan Lord alanslists at gmail.com
Fri Oct 23 09:27:49 GMT 2015


I want to write a little javascript code to do some things when the 
Start Date field of the Create Event form changes, or even when it loses 
focus.

But, I think the datepicker code is somehow obscuring what is happening 
to the input itself - if you look at the value of that input element it 
never actually changes when you use the datepicker...

If I grab the Start Date field input object

> var startDateElement = jQuery('#Calendar_editView_fieldName_date_start');

And watch it or try to fire an event change or blur, when I use the 
datepicker nothing in the input itself actually changes.

> startDateElement.blur(function(e) { //could also be startDateElement.change(function(e) {
> ...
> });


And the datepicker element itself gets some random name like 
"datepicker_311" so I don't know how I am supposed to match the 
datepicker to the input...

How can I do this?

Thanks

Alan



More information about the vtigercrm-developers mailing list