A few questions about the config form

I have two questions about the config form:

  1. I want to automatically set the end date when the user chooses a start date. Is this possible?
  2. Is it possible to hide the datepicker in the screen where the user can choose the end date?

When the user chooses a start date, i want to automatically set the end date the same as the chosen start date. The user should then only have the option to choose the hours and minutes for the end date.

Thanks,

CompuFit

I want to automatically set the end date when the user chooses a start date. Is this possible?

Try the following:

$$("scheduler").$$("editForm").elements["start_date"].attachEvent("onAfterRender",function(){ var id = this.config.id; dhx.delay(function(){ $$(id+"_calendar").attachEvent("onChange",function(date){ $$("scheduler").$$("editForm").elements["end_date"].setValue(date); }) }); });

Is it possible to hide the datepicker in the screen where the user can choose the end date?

Usually you can use hide() method to hide a certain view. But it is impossible to hide end_date view. It is obligatory.

Hello,

It works when you replace $$(id+"_calendar") with $$(id) in your code.

Thanks,

CompuFit