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

[Solved] Set the Calendar Mode -> MONTH mode

0 Answers 42 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bogdan
Top achievements
Rank 1
Bogdan asked on 07 Nov 2012, 04:09 PM
Hello,

I am trying to find a way to open the calendar for a telerik datetimepicker in month selection mode rather than day.
I would be happy even with a javascript solution as I cannot find the right trigger to switch the calendar from day to month on open

here is How I setup my calendar:
@Html.Telerik().DatePickerFor(m => m.Effective)
.Format("MMMM yyyy").TodayButton()
.HtmlAttributes(new { style = "width: 90%;", DateSelectionMode = "Month" })
.OpenOnFocus(true).ClientEvents(events => events.OnOpen("OnOpenDatePicker"))


I am trying to do some hacking on the onOpen with

GoToMonth : function () {
        var calendar = $("#Effective").data('tDatePicker');
        calendar.dateView.$calendar.find('.t-nav-fast').click();  
},
but it is UGLY ... and it opens day selection when clicked, I only want to select months Anyone ? Pls ?
Tags
Date/Time Pickers
Asked by
Bogdan
Top achievements
Rank 1
Share this question
or