Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Calendar functionality

    I'm looking into using the Calendar widget - particularly the compact version. My goal is to not use it as an event calendar but more like something and end-user would use to specify appointment days. The following list is what I need to be able to do with this widget:

    1. Should have a configurable different style for "past" dates
    2. Should have the notion of "available" dates. Dates which can be selected from the calendar.
    3. Should have the notion of "disabled" dates. Dates which should not be selectable from the calendar.

    Is this doable? I know I can override dayBodyClick for "disabling" the days that are not available but is there an easy way to change the style for it? I saw "canEditField" in the documentation but it was not taking effect when I added this field to the data source.

    #2
    You can do this by overriding getDayBodyHTML() and producing some HTML which fills the day area and has whatever background color you want based on custom logic to determine filled/not filled etc.

    Comment


      #3
      Ok Thanks - will this be supported in the future? There's already a 'dayBodyBaseStyle' property in which the documentation talks about states.

      Comment


        #4
        Yes, there will probably be an API similar to the ListGrid's getCellStyle() in the future.

        Comment

        Working...
        X