tags:

views:

1414

answers:

2

I have three textboxes, box1-filled by user1 box2-filled by user2 box3-filled by user3

I have also a default value for these three boxes. 1.Now when box1 is selected user1 cannot input dates before the default date and it should not be allowed to select dates more than in box2(if not blank,otherwise default date is considered). 2.user2 can enter dates in the range of box1 and box2. if these boxes are empty,default will be considered. 3.user3 can enter date after the dates in box2.

pls can you suggest some solution,as i am new to this technology. thnx in advance

A: 

You should look at the beforeShow function of the datepicker (take a look under the options tab in the link)-

Can be a function that takes an input field and current datepicker instance and returns a settings (anonymous) object to update the date picker with. It is called just before the datepicker is displayed.

I was looking to do some similar range/date restrictions with just two input controls in this question, to give you an idea of how you can work with the function.

Russ Cam
+1  A: 

Given you're scenario and desire to use jQuery to implement this behavior, how about this:

Wire up an onchange event handler using jQuery to each textbox and then when the value changes, perform your validation and take the appropriate steps.

AndrewDotHay