File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -802,9 +802,10 @@ protected function assemblePartialDayOptions(FieldsetElement $options): DateTime
802802 ]);
803803
804804 $ selectedFromTime = $ from ->getValue ();
805+ $ nextDayTimeOptions = [];
805806 foreach ($ timeOptions as $ key => $ value ) {
806- unset($ timeOptions [$ key ]); // unset to re-add it at the end of array
807- $ timeOptions [$ key ] = sprintf ( ' %s (%s) ' , $ value, $ this -> translate ( ' Next Day ' )) ;
807+ unset($ timeOptions [$ key ]);
808+ $ nextDayTimeOptions [$ key ] = $ value ;
808809
809810 if ($ selectedFromTime === $ key ) {
810811 break ;
@@ -813,7 +814,9 @@ protected function assemblePartialDayOptions(FieldsetElement $options): DateTime
813814
814815 $ to = $ options ->createElement ('select ' , 'to ' , [
815816 'required ' => true ,
816- 'options ' => $ timeOptions
817+ 'options ' => empty ($ timeOptions )
818+ ? ['Next Day ' => $ nextDayTimeOptions ]
819+ : ['Today ' => $ timeOptions , 'Next Day ' => $ nextDayTimeOptions ]
817820 ]);
818821 $ options ->registerElement ($ to );
819822
You can’t perform that action at this time.
0 commit comments