Quintiq file version 2.0
#parent: pnlStartOfPeriod/dsStartOfPeriod
Response OnChanged () id:Response_pnlStartOfPeriod_dsStartOfPeriod_OnChanged
{
  #keys: '[146730.0.1640265252]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebDateTimeFieldBase_OnChanged'
  QuillAction
  {
    Body:
    [*
      // Adjust the EndDate accordingly.
      if( ckbEndBy.Checked() )
      {
        delta := dsStartOfPeriod.Date() - dhStartOfPeriod.Data();
        dhStartOfPeriod.Data( dsStartOfPeriod.Date() );
        
        if( delta <> 0 )
        {
          dsEndOfPeriod.Date( dsEndOfPeriod.Date() + delta );
        }
      }
      else
      {
        // Determine the EndDate based on the number of occurrences.  
        Form.SetEndOfPeriod();
      }
    *]
    GroupServerCalls: false
  }
}
