calFormatter
Control formatting of the calbox Date Text
This option allows you to add a replacement formatter for the individual dates in the calendar grid display - by default, it is simply the Date (number) with no extra formatting.
This needs to be either a
- fully defined function
- reference to a function defined in window
The function must accept a single argument, which is an object of the Date:
The function can return either just a String/Number, or an object of the type:
The return value is parsed for each value, so you can return an object only where necessary if you prefer. As usual, the easiest method of passing the function in is as a reference. This sample function will italicize the “tens” dates (10 - 19) - although it is pretty much useless, it gives the idea:
Then, to link it to datebox, it could be as easy as:
Dynamically changing the function:
Admittedly, the function below is probably even more useless than the first one, but it demonstrates the principle:
Data Type Expected
Function
Default Vaule
true
Option is Dynamic Post Initialization
False