Hi All,
We are using html input type date in our hybrid application which launches the native datepicker in the app.
As we need the app to be accessible we chose the html type date.
However at certain instances we want to restrict the date selection till present date only. We have used the max attribute to achieve this, for some reasons the datepicker is not respecting this attribute and allowing the user to select future dates.
We are in a tricky position since we do not want to use any library and the production date is nearby.
Below is the markup we have used for replicating the behavior:
<form>
<label for="party">Choose your preferred party date:
<input type="date" name="party" min="2017-04-01" max="2017-04-30">
</label>
</form>
Any help would be appreciated.
Thanks in advance.
We are using html input type date in our hybrid application which launches the native datepicker in the app.
As we need the app to be accessible we chose the html type date.
However at certain instances we want to restrict the date selection till present date only. We have used the max attribute to achieve this, for some reasons the datepicker is not respecting this attribute and allowing the user to select future dates.
We are in a tricky position since we do not want to use any library and the production date is nearby.
Below is the markup we have used for replicating the behavior:
<form>
<label for="party">Choose your preferred party date:
<input type="date" name="party" min="2017-04-01" max="2017-04-30">
</label>
</form>
Any help would be appreciated.
Thanks in advance.