开发者

How to display the daily date in Telerik RadCalendar control

i have use telerik calender control use in asp.net.i have click the calender control and date are set near box but i want daily 开发者_如何转开发date automatically display... but i don't click calender control ..Any ideas how I should code this? i am beginner


Is this what you're talking about?

http://demos.telerik.com/aspnet-ajax/calendar/examples/functionality/today/defaultcs.aspx

Telerik RadCalendar can recognize and mark Today's date. You should define a RadCalendarDay object in the SpecialDays collection, set its style properties as required and then set the Repeatable property to RecurringEvents.Today.

When using an embedded skin for RadCalendar and the special day's ItemStyle-CssClass="rcToday", the skin's today style will be applied.


I'm not sure if this is what you're looking for, but the following JavaScript will select (not just highlight) today's date:

function SelectToday() {
    var todaysDate = new Date();
    var todayTriplet = [todaysDate.getFullYear(), todaysDate.getMonth() + 1, todaysDate.getDate()];
    var calendar = $find("<%=RadCalendar1.ClientID%>");
    calendar.selectDate(todayTriplet, true);
}

This can be executed on the OnLoad client-side event of the RadCalendar.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜