hongji.li
2023-11-07 1a1ba3ad5ed9e4380185aa1ccad20204a0e5f115
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
Quintiq file version 2.0
#parent: #root
Method UpdatePeriodNumberPickers () id:Method_FormNavigationPanel_UpdatePeriodNumberPickers
{
  #keys: '[137818.0.471387863]'
  Body:
  [*
    // Update period number pickers
    // since there are multiple RFCs
    // that block the number pickers
    // 1. Min Max modified by Quill not taking effect
    // 2. OnInputIdle and OnDataChange doesn't work/exist for number picker
    // we use this method to refresh the number when user violates constraints
    
    periodspec := DropDownListNavPeriodSpecification.Data();
    
    // WORKAROUND because NumberPicker Min Max modified by Quill not working properly.
    // Adjust the number picker value so that they don't exceed the max
    past := [Number]minvalue( NumberPickerShowPast.Max(), [Number]NumberPickerShowPast.Number() );
    future := [Number]minvalue( NumberPickerShowFuture.Max(), [Number]NumberPickerShowFuture.Number() );
    NumberPickerShowPast.Number( past );
    NumberPickerShowFuture.Number( future );
    // Update data holders
    ApplicationMacroPlanner.UpdatePeriodSelections( periodspec, past, future );
  *]
}