Defined a property name specialDates of type array, to pass an array of
dates.
Defined a property specialColor of type array ,to pass an array of different
color in format "[#FFFFFF]"
DateChooser instantiates the calendarLayout as a dateGrid and calls the
gradientFill( ) function of calendarLayout to fill/highlight the backGround
of the specialDate item in the grid by claculating its index, with the array
of specialColor Passed.
Try the following code
//----------------------------------
// specialDates In DateChooser.as
//----------------------------------
/**
* @private
* Storage for the specialDates property.
*/
private var _specialDates:Array ;
private var specialDatesChanged:Boolean = false;
[Inspectable(category="General", defaultValue="0")]
/**
* An array of Date objects which would have a backgroundColor different
* from the other dates.
*/
public function get specialDates():Array
{
return _specialDates;
}
/**
* @private
*/
public function set specialDates(value:Array):void
{
_specialDates = value.slice(0);
//_specialDates.sort(dateCompareFunc);
specialDatesChanged = true;
invalidateProperties();
}
/**
* @private
* Storage for the specialDatesColor property.
*/
private var _specialDatesColors:Array = [0xFF8040];
[Inspectable(category="General", defaultValue="0xFF8040")]
/**
* backgroundColor to be used for the dates specified by the specialDates
property.
*
* @default 0xFF8040
*/
public function get specialDatesColors():Array
{
return _specialDatesColors;
}
/**
* @private
*/
public function set specialDatesColors(value:Array):void
{
_specialDatesColors = value;
specialDatesChanged = true;
invalidateProperties();
}
//----------------------------------
// specialDates In CalendarLayout
//----------------------------------
/**
* @private
* Storage for the specialDates property.
*/
private var _specialDates:Array;
[Inspectable(category="General", defaultValue="0")]
/**
* An array of Date objects which would have a backgroundColor different
* from the other dates.
*/
public function get specialDates():Array
{
return _specialDates;
}
/**
* @private
*/
public function set specialDates(value:Array):void
{
_specialDates = value;
specialDatesChanged = true;
invalidateProperties();
}
/**
* @private
* Storage for the specialDates property.
*/
private var _specialDatesColors:Array = [0xFF8040];
[Inspectable(category="General", defaultValue="0")]
/**
* backgroundColor to be used for the dates specified by the specialDates
property.
*
* @default 0xFF8040
*/
public function get specialDatesColors():Array
{
return _specialDatesColors;
}
/**
* @private
*/
public function set specialDatesColors(value:Array):void
{
_specialDatesColors = value;
specialDatesChanged = true;
invalidateProperties();
}
On Thu, Jul 15, 2010 at 1:04 AM, kannan leo <[email protected]> wrote:
> Could you please post it here friend so that all others can also make use
> of it
>
> Thanks in advance,
> kannan. R
>
> On Wed, Jul 14, 2010 at 8:00 AM, Sidhu Vijay Sidhu
> <[email protected]>wrote:
>
>> Give me your email id .... I can send you the code
>>
>>
>> On Tue, Jul 13, 2010 at 12:28 PM, Gaurav Patel <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> There is a requirement in one of project on whihc i am working,
>>> requirement is *I want to change the background 'tile color' of certain
>>> dates in the dateChooser control so that when users view it, they can
>>> see that certain dates have an event on them or local holidays.*
>>>
>>> It would be very appreciative if some help me on resolving or even
>>> showing some direction in how to resolving this issue.
>>>
>>> --
>>> ----------------------
>>> Regards
>>> Gaurav Patel
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Flex India Community" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected]<flex_india%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/flex_india?hl=en.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Flex India Community" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<flex_india%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/flex_india?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.