Quintiq file version 2.0
#parent: #root
Method EnableDisableComponent () id:Method_DialogCreateEditScenarioActivity_EnableDisableComponent
{
  #keys: '[110880.4.86338896]'
  Body:
  [*
    // Enable / disable deadline
    GUIDateTimeSelectorDeadline.Enabled( CheckBoxDeadline.Checked() )
    
    data := Dialog.Data();
    deadline := Date::MaxDate();
    
    if ( CheckBoxDeadline.Checked() )
    {
      if ( data.Deadline().IsInfinite() )
      {
        deadline := Date::Today();
      }
      else
      {
        deadline := data.Deadline();
      }
    }
    
    
    GUIDateTimeSelectorDeadline.DateTime( deadline.DateTime() );
  *]
}
