This is a migrated thread and some comments may be shown as answers.

How to Set Scheduler Hyperlink Color

1 Answer 161 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Anieda Hom
Top achievements
Rank 1
Anieda Hom asked on 05 Sep 2018, 07:19 PM

Good afternoon Admin,

How to set the hyperlink color for .AllDayEventTemplate and .EventTemplate in scheduler?  When I added the style to the page, some hyperlinks color inside the scheduler still do not change.

Here is the code:

<style>
    a:link { color: #0000ff; }
    a:hover { text-decoration: underline; }
    .k-event k-event-inverse, .k-event 
        a:link { color: #0000ff; }
        a:hover {text-decoration: underline}       
</style>

@(Html.Kendo().Scheduler<HomeTaskViewModel>()
        .Name("scheduler")
        .Date(DateTime.Today)      
        .Editable(false)
        .Height(800)
        .AllDayEventTemplate("<a href='" + @Url.Action("Read", "Request") + "/" + "#= RequestId #'>#= description #</a>")    
        .EventTemplate("<a href='" + @Url.Action("Read", "Request") + "/" + "#= RequestId #'>#= description #</a>")     
        .Views(views =>
        {
            views.DayView();
            views.WorkWeekView(workWeekView => workWeekView.Selected(true));
            views.WorkWeekView();
            views.WeekView();
            views.MonthView();
            views.AgendaView();
    })
    .Resources(resource =>
    {
        resource.Add(m => m.GroupId)
            .Title("Owner")
            .DataTextField("Text")
            .DataValueField("Value")
            .DataColorField("Color")
            .BindTo(Model.Select(x => new { Text = x.GroupName, Value = x.GroupId, Color = x.Color }));
    })
    .DataSource(d => d
    .Model(m =>
    {
        m.Id(f => f.RequestId);
        m.Field(f => f.Description).DefaultValue("No title");
        m.Field(f => f.GroupId).DefaultValue(1);
        m.Field(f => f.Title).DefaultValue("No title");
        m.RecurrenceId(f => f.RecurrenceID);
    })
    .Read("ReadRequests", "Home", "Scheduler")
    )
    )

<script type="text/javascript">
    $(function () {
        $(".GroupNames :checkbox").change(function (e) {
            var checked = $.map($(".GroupNames :checked"), function (checkbox) {
                return parseInt($(checkbox).val());
            });

            var filter = {
                logic: "or",
                filters: $.map(checked, function (value) {
                    return {
                        operator: "eq",
                        field: "GroupId",
                        value: value
                    };
                })
            };

            var scheduler = $("#scheduler").data("kendoScheduler");
            scheduler.dataSource.filter(filter);
        });
    })
</script>

 

What is the correct way to do it?

Thanks in advance for your help!

Anieda

 

1 Answer, 1 is accepted

Sort by
0
Anieda Hom
Top achievements
Rank 1
answered on 05 Sep 2018, 08:17 PM
Dear Admin,


Never mind.  I cleared the cache of the browser and it works!

 

Thanks,
Anieda

 

Tags
Scheduler
Asked by
Anieda Hom
Top achievements
Rank 1
Answers by
Anieda Hom
Top achievements
Rank 1
Share this question
or