We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How use property SelectedDays?

Thread ID:

Created:

Updated:

Platform:

Replies:

125316 Aug 8,2016 12:02 PM UTC Aug 12,2016 11:13 AM UTC WPF 5
loading
Tags: CalendarEdit
Berezkin Gena
Asked On August 8, 2016 12:02 PM UTC

I am trying to programmatically manipulate "SelectedDates" property, but changes in the collection does not affect the visual display.

How use property SelectedDays?

Priyanga Balasubramaniam [Syncfusion]
Replied On August 9, 2016 10:02 AM UTC

Hi Berezkin,

Thank you for contacting Syncfusion Support.

We have checked your query and created a sample. In this sample, we have selected the multiple dates by adding dates to "SelectedDates" property in button click event.

Please download the sample from the below location.

Sample: CalendarEditSample

Regards,
Priyanga B

Berezkin Gena
Replied On August 9, 2016 03:00 PM UTC

Thank you!

Your example has helped detect problems in my code. I found a problem that can not be solved. The attached file contains an example that will help you understand the problem.
To reproduce the problem you need to:
1. Start project;
2. Select a date that differs from the current date;
3. Repeatedly pressing the "<" or ">" button.

The number of days selected in the GUI and collection is different.

Attachment: CalendarEditSample_81ccb9f2.rar

Priyanga Balasubramaniam [Syncfusion]
Replied On August 10, 2016 12:07 PM UTC

Hi Berezkin,

We have checked your query and sample. You have used "SelectedDates.Clear()" in Button click event. This only clears the SelectedDates collection. The value in the Date property will not be cleared because minimum one date should be selected in the calendar, this is behavior.

We have changed your last updated sample to meet your requirement. In this sample we have added date to SelectedDates collection and also changed the value of Date property.

Please download the sample from the below location.

Sample:CalendarEditSample

Regards,
Priyanga B.

Berezkin Gena
Replied On August 11, 2016 11:14 AM UTC

Thank you, it works.

How can I select two dates from different months?
For example, on June 6 and 6 August. Is that possible?

Priyanga Balasubramaniam [Syncfusion]
Replied On August 12, 2016 11:13 AM UTC

Hi Berezkin,

Thank you for the update.

In our current implementation of CalendarEdit control, we can add date’s from two different months to SelectedDates collection. But in UI while clicking the MonthNavigation buttons (Right and Left arrows) SelectedDates collection will be reset to first date of current month and selected date of month will be first date of current month. This is the behavior of CalendarEdit control.

Please provide us more information about your requirement to analyze and provide you a solution.

Regards,
Priyanga B


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;