I have a requirement to check if the day selected is Wednesday. If the date selected is Wednesday, I need to change the date selected to the following Saturday, otherwise leave the date as selected by the user. A very unusual requirement. I realize this will require custom code on my part, but I was wondering if you could tell me whether or not I can access the day of the week to perform this check or just recommend what properties and or functions I might want to consider using to make this happen.
Change Date based on Day of the week selected
Posted July 21st, 2008 by jborys
Day of the week
Hi,
Let's assume that your scal instance is called sample cal. The function below would give you the day of the week for the currently selected element:
samplecal.getDateByElement(samplecal.getSelectedElement()).getDay()
As for switching dates on selection, you need to write a custom oncalchange handler. Details on this are located on the options page:
http://scal.fieldguidetoprogrammers.com/scal-v02-documentation/scal-opti...
Post new comment