Click here to Skip to main content
15,884,739 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
<input  id ="daterange" type="daterange" readonly="readonly" ng-model="filter.date" ranges="ranges"class="rnagePickerinput ng-valid" format="DD/MM/YYYY" aria-invalid="false">


User should only be able to select date prior to 1 year from current date i.e If today is 10Sept 2021 , user should only be able to select input from 10Sept 2020. 


What I have tried:

<pre><input  id ="daterange" type="daterange" readonly="readonly" ng-model="filter.date" ranges="ranges"class="rnagePickerinput ng-valid" format="DD/MM/YYYY" aria-invalid="false" ????>
Posted
Updated 9-Sep-21 21:12pm
Comments
Richard Deeming 10-Sep-21 5:12am    
There is no <input type="daterange"> in HTML, so you must be using a custom library. You'll need to consult the documentation for that library to see how to restrict entry.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900