File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,8 @@ public function configureOptions(OptionsResolver $resolver): void
3232
3333    public  function  buildView (FormView $ viewFormInterface $ formarray  $ optionsvoid 
3434    {
35-         $ viewvars ['maximum_date ' ] = $ options'maximum_date ' ] ?
36-             DateTime::createFromFormat ($ options'format ' ], $ options'maximum_date ' ]) : null ;
37-         $ viewvars ['minimum_date ' ] = $ options'minimum_date ' ] ?
38-             DateTime::createFromFormat ($ options'format ' ], $ options'minimum_date ' ]) : null ;
35+         $ viewvars ['maximum_date ' ] = $ options'maximum_date ' ] ?? null ;
36+         $ viewvars ['minimum_date ' ] = $ options'minimum_date ' ] ?? null ;
3937        $ viewvars ['format ' ] = $ options'format ' ];
4038        $ viewvars ['divider ' ] = (strpos ($ options'format ' ], '- ' ) !== false ) ? '- '  : '/ ' ;
4139        $ viewvars ['helper_text ' ] = $ options'helper_text ' ] ?? null ;
Original file line number Diff line number Diff line change @@ -41,10 +41,8 @@ public function configureOptions(OptionsResolver $resolver): void
4141
4242    public  function  buildView (FormView $ viewFormInterface $ formarray  $ optionsvoid 
4343    {
44-         $ viewvars ['maximum_date ' ] = $ options'maximum_date ' ] ?
45-             DateTime::createFromFormat ($ options'format ' ], $ options'maximum_date ' ]) : null ;
46-         $ viewvars ['minimum_date ' ] = $ options'minimum_date ' ] ?
47-             DateTime::createFromFormat ($ options'format ' ], $ options'minimum_date ' ]) : null ;
44+         $ viewvars ['maximum_date ' ] = $ options'maximum_date ' ] ?? null ;
45+         $ viewvars ['minimum_date ' ] = $ options'minimum_date ' ] ?? null ;
4846        $ viewvars ['format ' ] = $ options'format ' ];
4947        $ viewvars ['divider ' ] = (strpos ($ options'format ' ], '- ' ) !== false ) ? '- '  : '/ ' ;
5048        $ viewvars ['datepicker ' ] = $ options'datepicker ' ] ?? false ;
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments