I am newbee to angularjs, don't know exactly how to write the Angularjs code. But need some help regard date validation on html5 form.
I have two dates actually.
1. Product Purchase Date
2. Product Warranty End Date
When a user selects "Product Purchase Date", then the field of "Product Warranty End Date" which is min=""(css3) to be set with "Product Purchase Date".
Need some code for this if someone could help me here.
assign ng-model of product purchase date to product warranty date
eg:
<input type="text" ng-model="purchaseDate">
<input type="text" ng-bind="purchaseDate">
hope fully this will help you
Here is my code please see it and let me know how to set only min attribute to Product Purchase Date.
<label for="PPurDate">Printer Purchase Date<span class="mycolon">:</span> </label>
<input type="date" name="PPurDate" id="PPurDate" /> <br><br>
<label for="Wend">Warranty End Date<span class="mycolon">:</span></ label>
<input type="date" min="?" name="Wend" id="Wend" /><br><br />
Because what I want is that when a user selects "Printer Purchase Date" as 23-01-2014 then "min" attribute for Warranty End Date should be set as selected "Printer Purchase Date". Because you can't have Warranty End Date lesser than "Printer Purchase Date".
댓글 없음:
댓글 쓰기