Skip to content

DateValidator add support for time values #7177

@nkovacs

Description

@nkovacs

DateValidator sets the time part to 00:00:00 when inserting the timestamp into timestampAttribute, because here the $timetype argument is set to IntlDateFormatter::None.
It doesn't help if you use Yii::$app->formatter->datetimeFormat as a format, because both Yii::$app->formatter->datetimeFormat and Yii::$app->formatter->dateFormat are "medium", so DateValidator doesn't know if you want to keep the time or not.

The other problem is that even though it cuts off the time part, it still accepts input that contains a time part.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions