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

Is it possible to allow the user to select only Mondays on a DatePicker?

3 Answers 425 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Pooya
Top achievements
Rank 1
Pooya asked on 07 Jun 2011, 01:31 PM
I'd like to use the DatePicker control: http://demos.telerik.com/aspnet-ajax/calendar/examples/datepicker/clientapi/defaultcs.aspx

Would it be possible to enable only Mondays to be selectable when user wants to pick a date?

Thanks,

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Jun 2011, 03:03 PM
Hello Pooya,

You can achieve this by handling both the server-side DayRender and client-side OnDayRender events of the calendar control. The server DayRender event is necessary for disabling the days on initial page load or postback and the client-side DayRender event for disabling the days on client-side navigation to a different month view.

Check out the following code-library for more on this.
Disabling calendar days

Thanks,
Shinu.
0
Gioce90
Top achievements
Rank 1
answered on 13 Jun 2016, 08:28 PM

Hi,

It is possible do the same thing, but handling the client-side only?

(I'm trying to use the code-behind the least possible)

0
Eyup
Telerik team
answered on 16 Jun 2016, 10:54 AM
Hello Gioce,

I'm afraid you will need to disable the rendered days on the server. You can use SpecialDays to achieve this requirement. Please examine the web sites provided in the following post:
http://www.telerik.com/forums/calendar-questions#rk4_SG3ajUODfE-WKdhx2Q

I hope they will prove helpful.


Regards,
Eyup
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Calendar
Asked by
Pooya
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Gioce90
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or