Forums

jQuery onchange datepicker

jj135 02 Apr, 2015
Hi! In a from I need to 'empty' a radio group when a date is selected with a datepicker in a date (text) field.

I tried 'onchange'

jQuery('input#afspraak').change(function () {
jQuery('#ftr-seminar input').prop('checked', false);
});

But this does not work. I now use this

jQuery('input#afspraak').click(function(){
jQuery('#ftr-seminar input').prop('checked', false);
});

This empties the radio buttons, but I actually only want to dot this if there is a date placed in the date field by the datepicker.

Is there any way I can have jQuery do something after the datepicker has been used? Who can point me in the right direction?

Kind regards,
Jip
GreyHead 06 Apr, 2015
Hi Jip,

As far as I can see from the code the ChronoForms datepicker doesn't fire an event when it changes. If you switch to using the JQuery UI datepicker then there is an onSelect event that you can hook in to - see [url=http://stackoverflow.com/a/6471992/2030112]this StackOverFlow answer[/URL].

bOB
Max_admin 06 Apr, 2015
Hi,

Please try this event, it has been added in the latest update:

$("#field_id").on("select_date.gdatetimepicker", function(){
//event code here
});


Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.