Validation in text boxes using datepicker
I have three text boxes, box1-fill by user1 box2-fill by user2 box3-fill by user3
I also have a default for these three fields. 1. Now that field1 is selected, user1 cannot enter dates before the default date, and should not be allowed to select dates greater than box2 (unless empty, otherwise the default is considered). 2.user2 can input dates in the range box1 and box2. if these fields are empty, will be considered by default. 3.user3 can put date after dates in box2.
pls can you suggest some kind of solution as i am new to this technology. thnx in advance
You should have a look at the beforeShow datepicker function (look at the options tab in the link) -
There could be a function that takes an input field and the current instance of the datepicker and returns a settings (anonymous) object to update the date picker from. It is called just before the datepicker is displayed.
I was looking for some range / date constraints with just two controls in this question to give you an idea of how you can work with the function.
source to share