Hello,
I am trying to call a certain function for each date field when "onHideComplete". I could not figure out how to do it using the "Date Fields Settings", so now I'm trying to do it using the javascript form code field. I added the following code, but it's not working as it should. It creates a second datepicker button. So how do I add the "onHideComplete" property to the already created Calendar object "myCal_datum" and "myCal_datum_retour"?
example:
I did try something like this but did not work:
I am trying to call a certain function for each date field when "onHideComplete". I could not figure out how to do it using the "Date Fields Settings", so now I'm trying to do it using the javascript form code field. I added the following code, but it's not working as it should. It creates a second datepicker button. So how do I add the "onHideComplete" property to the already created Calendar object "myCal_datum" and "myCal_datum_retour"?
example:
var execute1 = function(){
alert('do something');
}
var execute2 = function(){
alert('do something too');
}
var myCal_datum = new Calendar({ datum: 'd/m/Y' }, { classes: ['dashboard'], direction: .5, onHideComplete: execute1 });
var myCal_datum_retour = new Calendar({ datum: 'd/m/Y' }, { classes: ['dashboard'], direction: .5, onHideComplete: execute2 });
I did try something like this but did not work:
myCal_datum.onHideComplete = execute1;
myCal_datum_retour.onHideComplete = execute2;