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

WPF Calendar SelectableDateStart issues

6 Answers 226 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Fanis
Top achievements
Rank 1
Fanis asked on 24 Jun 2011, 11:18 AM

Hi,

First I apologize if the following issues are already replied.

I am using the WPF Calendar and I have the following issues:

  1. When I try to set the SelectableDateStart to a date prior to current Month (e.g 20 May 2011)

calendar starts again from current month (June in our case).

How is it possible to show calendar starting from the right month?

In my example I use the following dates:

SelectableDateStart: 20 May 2011

SelectableDateEnd: 26 October 2011

I also calculate the DisplayDateStart to be the first day of SelectableDateStart,

and DisplayDateEnd to be the last day of SelectableDateEnd.

  1.  When I try to set SelectableDateStart to a date after the current month (e.g 8 July 2011)

I get an ArgumentOutOfRangeException:

Invalid DisplayDateStart value.

Parameter name: sender


Thanks in advance

6 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 30 Jun 2011, 08:52 AM
Hello Fanis,

I would suggest to set DisplayDate property of the RadCalendar.  Also check out this help article which explains in details how to constrain the selection and visible days.

All the best,
Yana
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Fanis
Top achievements
Rank 1
answered on 30 Jun 2011, 10:58 AM
Thanks a lot.. It works fine now..
0
Veda
Top achievements
Rank 1
answered on 08 Jul 2011, 11:01 AM
Is any property available for Constraining Selection and Visibility of Time in Telerik DateTime Picker.
the SelectableDateEnd only set the Date not time. What should i do if i want to restrict some time as Selectable Time end?



Regards,
Veda
0
Yana
Telerik team
answered on 08 Jul 2011, 01:44 PM
Hi Veda,

I'm afraid that RadDateTimePicker doesn't provide properties which limit the time. SelectableDateStart and SelectableDateEnd are inherited from RadCalendar, that's why they restrict only the date.

Greetings,
Yana
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Mark
Top achievements
Rank 1
answered on 14 Jan 2013, 06:11 PM
When I set DisplayDateStart=#1/1/2011# and DisplayDateEnd=#12/1/2012 in code behind or view model, the RadDateTImePicker shows years 2010, 2011 and 2012 in the calendar drop down.

I think this is a bug. I expect to see years 2011 and 2012.

When I change DisplayDateStart to  #1/2/2011# (one day later), the RadDateTImePicker shows years 2011 and 2012 in the calendar drop down which is what I want. 

XAML

<telerik:RadDatePicker Name="FromPeriod" DateSelectionMode="Year" SelectedValue="{Binding SelectedSpanStartMonth,Mode=TwoWay}" />

code behind

Me.FromPeriod.Culture = New System.Globalization.CultureInfo("en-US")
Me.FromPeriod.Culture.DateTimeFormat.ShortDatePattern = "yyyy"
Me.FromPeriod.DisplayDateStart = #1/1/2011#
Me.FromPeriod.DisplayDateEnd = #12/1/2012#
0
Alek
Telerik team
answered on 15 Jan 2013, 03:19 PM
Hi Mark,

We managed to reproduce the scenario following the instructions in your post. 

It seems that there is an issue in the control and we logged it in our Public Issue Tracker. You can reach it here.

We are glad to add points to your account for reporting us this behaviour.

Greetings,
Alek
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Calendar
Asked by
Fanis
Top achievements
Rank 1
Answers by
Yana
Telerik team
Fanis
Top achievements
Rank 1
Veda
Top achievements
Rank 1
Mark
Top achievements
Rank 1
Alek
Telerik team
Share this question
or