File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -788,6 +788,7 @@ protected function assemblePartialDayOptions(FieldsetElement $options): DateTime
788788
789789 $ selectedFromTime = $ from ->getValue ();
790790 foreach ($ timeOptions as $ key => $ value ) {
791+ unset($ timeOptions [$ key ]); // unset to re-add it at the end of array
791792 $ timeOptions [$ key ] = sprintf ('%s (%s) ' , $ value , $ this ->translate ('Next Day ' ));
792793
793794 if ($ selectedFromTime === $ key ) {
@@ -876,7 +877,9 @@ protected function assembleMultiDayOptions(FieldsetElement $options): DateTime
876877 $ selectedFromDay = (int ) $ from ->getValue ();
877878
878879 for ($ i = 1 ; $ i <= $ selectedFromDay ; $ i ++) {
879- $ toDays [$ i ] = sprintf ('%s (%s) ' , $ toDays [$ i ], $ this ->translate ('Next week ' ));
880+ $ day = $ toDays [$ i ];
881+ unset($ toDays [$ i ]); // unset to re-add it at the end of array
882+ $ toDays [$ i ] = sprintf ('%s (%s) ' , $ day , $ this ->translate ('Next week ' ));
880883 }
881884
882885 $ options ->addElement ('select ' , 'to_day ' , [
You can’t perform that action at this time.
0 commit comments