| |
|
Tutorial - EnabledDateExpression property
|
| | |
Calendar can disable certain dates based on a javascript expression you provide with EnabledDateExpression property.
This expression is evaluated for every day to be rendered.
When expression evaluates to true, the date to be rendered is enableld. If false, then disabled.
| | |
Example
This example evaluates to false for every date.
<obout:Calendar runat="server" StyleFolder="/calendar/styles/default" EnabledDateExpression="false"> </obout:Calendar>
|
|
| | |
Example
This example only enables Tuesdays and Thursdays.
currentDate is the javascript Date type variable that is used to render each day.
<obout:Calendar runat="server" StyleFolder="/calendar/styles/default" EnabledDateExpression="currentDate.getDay()==2 || currentDate.getDay()==4"> </obout:Calendar>
|
|
| | |
Example
This expression evaluates to true only if date is even.
<obout:Calendar runat="server" StyleFolder="/calendar/styles/default" EnabledDateExpression="currentDate.getDate() % 2 == 0"> </obout:Calendar>
|
|
| | |
Example
This expression evaluates to true only if date is equal to variable.
Declare the client variable inside your head element. <script language="text/javascript"> var dateVariable = 3; </script> <obout:Calendar runat="server" StyleFolder="/calendar/styles/default" EnabledDateExpression="currentDate.getDate() == dateVariable"> </obout:Calendar>
|
|
| | |
Example
This expression evaluates to true only if function returns true.
Declare the client function inside your head element. <script language="text/javascript"> function ValidateDate(currentDate) { if (currentDate.getDate() % 3 == 0) return true; return false; } </script> <obout:Calendar runat="server" StyleFolder="/calendar/styles/default" EnabledDateExpression="ValidateDate(currentDate)"> </obout:Calendar>
|
|
| | |
| "I really like your Flyout control since it is easy and and fast integration" |
Vlad |
|
| | |
|
|
|
|