Formidable
Formidable copied to clipboard
Render of 'date' input is incorrect
The rendering of an <input type="date"/>
is incorrect. You are over riding with three drop down selectors. This should be pulled out as browsers know how to render. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
The problem is with the current solution is that it if your markup specifies an id for the field (not uncommon if you are using <label for.../>
) ,the id is repeated for the day, month and year selectors.
Also, year is restricted to max of current year.
You'd almost be better to rely on jquery date, but that brings in a dependency you may not want.
So, suggest you a/ enable an option that allows no library rendering of date field and b/ appends .day, .month and .year to the id if present to prevent html syntax failures and c/ allow specification of min and max dates.
What do you mean by "no library rendering" ? Avoiding the three dropdowns ?
I'm ok with the id change
I don't understand how the min and max would be handled, maybe with relative dates like min="-1year"
or max="now"
? (handled with strtotime
?)
'no library rendering' - switch off the Formidable library rendering of the date field, leaving it simply as <input type="date"/>
in the html rendering.
id change: can be handled as separate issue/PR
min and max handling: yes, that needs some discussion. Can be handled as a separate issue/PR
Yes ok, disabling the library rendering might be the default, don't you think ? Not sure how much this is currently supported