Quintiq file version 2.0
#parent: PanelEnd/CheckboxEnd
Response OnUserChanged () id:Response_PanelEnd_CheckboxEnd_OnUserChanged
{
  #keys: '[139394.0.996977662]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebCheckbox_OnUserChanged'
  QuillAction
  {
    Body:
    [*
      // Update end datetime when user toggles the checkbox
      checked := CheckboxEnd.Checked();
      dateValue := guard( Form.DataHolderDialogData().Data().EndDate(), MacroPlan.End().Date() );
      
      dsEnd.Enabled( checked, "" ); 
      
      if( checked )
      {
        end := ifexpr( dateValue.IsFinite()
                       ,dateValue
                       ,MacroPlan.End().Date() );
        dsEnd.Date( end  );
      }
      else if( not checked )
      {
        dsEnd.Date( Date::MaxDate() );
      }
    *]
    GroupServerCalls: false
  }
}
