Please make submit action obey date/time format to be a validd date
Closed this issue · 6 comments
Please make submit action obey date/time format to be a validd date
Example: User do not fill entire date format, just inform a part of date... but InlDateTime field accepts as dai **** from current month. If i'm forcing a format is because i want this pattern to be filled.
IntlDateTime::make('Birthdate', 'birthdate')
->rules('required', 'date')
->dateFormat('DD/MM/YYYY')
->hideFromIndex(),
Other stuff: Make component accept only date
, if i'm using a format DD/MM/YYYY
or something like that don't need to complement it with 00:00:00
I am pretty sure this should not display any time if you don’t specify a timeFormat
.
Please elaborate a bit more. How is your database schema set up? Are you using a date field or datetime field in MySQL?
The module itself is an extension of the Nova DateTime field, hence the name.
Yep. Not show... but send it with 00:00:00
to save...
But if you would simply store the date in a MySQL date
field instead of datetime
it should not store any time, am I right?
I think so.
But, about to abey the format? I think it's obvious that it's better to obey the format before consider a valid date... inform only a day or month is not enough to fill entire date
So if I understand you correctly you would like some sort of validation on the client side? In general the user would pick the date from the dropdown datepicker which is shown once the field is clicked.
If you want validation then please close this issue and make a new to make all conversation less confusing. 😇