Quintiq file version 2.0
#parent: CheckBoxHasEnd
Response OnChange () id:Response_DialogCreateEditFulfillmentRestriction_CheckBoxHasEnd_OnChange
{
  #keys: '[130152.0.270410906]'
  Body:
  [*
    GUIDateTimeSelectorEndDate.Enabled( CheckBoxHasEnd.Checked() );
    
    if( CheckBoxHasEnd.Checked() and not GUIDateTimeSelectorEndDate.DateTime().Date().IsFinite() )
    {
      end := MacroPlan.End()
      GUIDateTimeSelectorEndDate.DateTime( end );
    }
    else if( not CheckBoxHasEnd.Checked() )
    {
      GUIDateTimeSelectorEndDate.DateTime( DateTime::MaxDateTime() );
    }
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_CheckBox_OnChange'
}
