Skip to content
This repository has been archived by the owner on Jun 26, 2022. It is now read-only.

Please make submit action obey date/time format to be a validd date #5

Closed
wemersonrv opened this issue May 20, 2019 · 6 comments
Closed

Comments

@wemersonrv
Copy link

wemersonrv commented May 20, 2019

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(),

intl

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

@techouse
Copy link
Owner

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.

@wemersonrv
Copy link
Author

Yep. Not show... but send it with 00:00:00 to save...

@techouse
Copy link
Owner

techouse commented May 20, 2019

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?

user interface
ui
MySQL schema
database_schema
stored data
stored_data

@wemersonrv
Copy link
Author

I think so.

@wemersonrv
Copy link
Author

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

@wemersonrv wemersonrv reopened this May 20, 2019
@techouse
Copy link
Owner

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. 😇

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants