[Enhancement] Ability to make Calendar HTML5 Required #1540

Closed
TriplicateGirl opened this Issue Dec 8, 2016 · 0 comments

Projects

None yet

2 participants

@TriplicateGirl

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[X] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

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

@TriplicateGirl TriplicateGirl changed the title from [Enhancement] Ability to make to Calendar HTML5 Required to [Enhancement] Ability to make Calendar HTML5 Required Dec 8, 2016
@Mrtcndkn Mrtcndkn self-assigned this Dec 9, 2016
@Mrtcndkn Mrtcndkn added the enhancement label Dec 9, 2016
@Mrtcndkn Mrtcndkn added this to the 1.1 milestone Dec 9, 2016
@Mrtcndkn Mrtcndkn added a commit that closed this issue Dec 9, 2016
@Mrtcndkn Mrtcndkn fixed #1540 3880ffe
@Mrtcndkn Mrtcndkn closed this in 3880ffe Dec 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment