Today Date Decoration

4 posts, 0 answers
  1. vijay
    vijay avatar
    23 posts
    Member since:
    May 2015

    Posted 16 Oct 2015 Link to this post

    Hello,

     I have two condition.

    1. I want two decorate today(Current) date apply  some different color or some border.

    2. I don't want to highlight today(Current) date.

    Please help me out of this.

     

    Thanks

    Vijay Chhalotre

  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 16 Oct 2015 Link to this post

    Hello Vijay,

    Thank you for your question. You can use the adapter's setTodayCellBorderColor method for both scenarios:

    1. calendarView.getAdapter().setTodayCellBorderColor(Color.RED);
    2. calendarView.getAdapter().setTodayCellBorderColor(Color.TRANSPARENT);


    I hope this helps.

    Regards,
    Todor
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. vijay
    vijay avatar
    23 posts
    Member since:
    May 2015

    Posted 16 Oct 2015 in reply to Todor Link to this post

    Hello Todor,

     Thanks for your response.

    I want to display today's date same as other dates. Because my requirement is I applied background color for every month, date according to attendance roster. All dates set background properly, but only today date is not set.

    please help me out of this.

  5. Todor
    Admin
    Todor avatar
    778 posts

    Posted 21 Oct 2015 Link to this post

    Hi Vijay,

    Since you don't want the today date marked in a special way, you can apply the following customization:

    this.calendarView.setCustomizationRule(new Procedure<CalendarCell>() {
        @Override
        public void apply(CalendarCell argument) {
            if (argument.isToday()) {
                argument.setAsToday(false);
            }
        }
    });


    Regards,
    Todor
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
DevCraft banner