[Enhancement] Ability to make Calendar HTML5 Required #1540
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
I'm submitting a ... (check one with "x")
Current behavior
When adding required or required="true", the p-calendar element has the required attribute - however the input that is nested in the calendar does not. This means that the form will still submit even without filling in the field.
This is similar to a previous request for p-dropdowns (which works great): #230
Expected behavior
Ability to add required or required="true" to p-calendar and have HTML5 pick up the field as part of its validation.
What is the motivation / use case for changing the behavior?
Using simple HTML5 validation is all my application requires, this makes it difficult to require date fields without creating various work-arounds.
Angular version: 2.1.2
PrimeNG version: 1.0.0
The text was updated successfully, but these errors were encountered: