lazhen
2025-01-09 8afe90b633046db39042aada36b88193062f8cff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Quintiq file version 2.0
#parent: #root
Method EnableDaysOnlyMode () id:Method_LibCal_dlgEditTimeInterval_EnableDaysOnlyMode
{
  #keys: '[150080.0.514092931]'
  Body:
  [*
    // Hide start and end time, and checkbox 'All day'
    durStartTimeOfDay.Visible( false );
    durEndTimeOfDay  .Visible( false );
    ckbIsAllDay      .Visible( false );
    
    // Additionally: change label from 'Start time' to 'Start',
    //               hide end, and show the applicable controls for the duration.
    dsStartDate.Label( "Start" );
    dsEndDate  .Visible( false );
    valDuration.Visible( false );
    npDuration .Visible( true  );
    lblDays    .Visible( true  );
    
    // Just to be sure: make sure the times are 0:00
    // (in case an occurrence is edited that was created when days only more was turned off).
    durStartTimeOfDay.Duration( Duration::Zero() );
    if( durEndTimeOfDay.Duration() > Duration::Zero() )
    {
      dsEndDate.Date( dsEndDate.Date() + 1 );
      durEndTimeOfDay.Duration( Duration::Zero() );
    }
  *]
}