Reputation: 11
I'm trying to cause my Datepicker to set its minimum date dynamically based on value chosen from List of Values. To be specific I have a club that has a date of creation. Based on that I want to create a member of that club, but after choosing to which club I want to add that member I want the minDate value of the Datepicker to be set as the day of creation of that specific club (for example I choose a club that was created 31/08/99 so the datepicker's minDate should be that date). Will be grateful for any help. (I've tried getting the date and assinging it to a hidden item in order to reference it but the only thing I achieved is all dates being blocked. Don't know if that's an issue with the solution or maybe with the return value of sql query that returns the date. I also could't find any documentation regarding Datepicker to understand what can be typed in the Minimum/Maximum Date attribute-fields)
Upvotes: 1
Views: 1423
Reputation: 151
You can reference a page item for minimum date. Getting the date and writing it to an hidden item was the correct first step. You can utilize a dynamic action on change of your Select List (LoV) which sets the clubs creation date for the hidden item (make sure to utilize correct Dateformat here, this needs to be the same as your datepickers)
Make sure to add the hidden item to "Items to return" so its value is saved.
Add a 2nd true action which refreshed your datepicker item
Upvotes: 2