You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, how can I use datepicker control in form rule as in example below? The date_from control's getValue() return DateTimeImmutable instance which does not have __toString() implemented thus throws an error in Nette\Forms\Validator::formatMessage()
$form->addDatePicker('date_from', 'Dátum od');
$form->addDatePicker('date_to', 'Dátum do')
->addRule($form::RANGE, 'Please select date between %d and %d', [$form['date_from'], new \Nette\Utils\DateTime()]);
Thanks!
The text was updated successfully, but these errors were encountered:
Hi, how can I use datepicker control in form rule as in example below? The
date_from
control'sgetValue()
returnDateTimeImmutable
instance which does not have__toString()
implemented thus throws an error inNette\Forms\Validator::formatMessage()
Thanks!
The text was updated successfully, but these errors were encountered: