Details
-
Type: New Feature
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 1.5.2
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Operating System: All
Platform: All
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration
Description
People in the forums have requested the ability to highlight certain
dates in the ice:selectInputDate component.
- Only really applies to the popup
- Use different styles for these days
- Since people have expressed an interest in highlighting several dates in
different ways, say yellow for stat holidays and gray for weekends, then the API
should allow for them to just return a style class for each date, instead of us
hardcoding some specific number of highlighted styles. We should probably give
a single style class for highlighting, that they could just usse as a default,
or extend for their customised coloring
- Could specify a list of highlighted dates, or use algorithmic rules, or chain
a combination of these
dates in the ice:selectInputDate component.
- Only really applies to the popup
- Use different styles for these days
- Since people have expressed an interest in highlighting several dates in
different ways, say yellow for stat holidays and gray for weekends, then the API
should allow for them to just return a style class for each date, instead of us
hardcoding some specific number of highlighted styles. We should probably give
a single style class for highlighting, that they could just usse as a default,
or extend for their customised coloring
- Could specify a list of highlighted dates, or use algorithmic rules, or chain
a combination of these
To add this functionality the following three attributes has been added to the selectInputDate component. -revision 13875
1. highlightClass
2. highlightUnit
3. highlightValue
In order to highlight a day, all above attributes are need to be set with corresponding values(e.g.):
// highlight new year
<ice:selectInputDate highlighClass="newyear"
highlightUnit="DAY_OF_YEAR"
highlightValue="1" />
To highlighting days in more granular fashion, above attributes can be set to defining more then one rules, by separating with : colon (e.g.)
// highlight new year and sunday
<ice:selectInputDate highlighClass="newyear: weekend"
highlightUnit="DAY_OF_YEAR: DAY_OF_WEEK"
highlightValue="1: 7" />
A rule can be set to defining more then one values using comma "," (e.g.)
// highlight new year, Saturday and Sunday
<ice:selectInputDate highlighClass="newyear: weekend"
highlightUnit="DAY_OF_YEAR: DAY_OF_WEEK"
highlightValue="1: 1, 7" />
NOTE: all 3 highlight attributes should have a corresponding values.