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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Add more ranges for BlackoutDatesRange

Thread ID:





141932 Jan 10,2019 10:01 PM UTC Jan 14,2019 08:12 AM UTC WPF 3
Tags: CalendarEdit
Luis Angel Valencia
Asked On January 10, 2019 10:01 PM UTC

Hello, I am trying to add more ranges in CalendarEdit for BlackoutDates like this:

<syncfusion:CalendarEdit Grid.Column="0" Grid.Row="0" 
                            <syncfusion:BlackoutDatesRange StartDate="1/01/1900" 
                                                       EndDate="{x:Static sys:DateTime.Today}"/>

                            <syncfusion:BlackoutDatesRange StartDate="1/20/2019" 

But it is not working, it is getting me error

Looks like it is not possible :(

Can you help me?

Arulraj A [Syncfusion]
Replied On January 11, 2019 08:38 AM UTC

Hi Luis 
Thanks for using Syncfusion product. 
We have checked your query “How to Add more ranges for BlackoutDatesRange in CalendarEdit”. We have prepared a sample based on your requirement in which we have added more ranges for BlackoutDatesRange in CalendarEdit as like you did, but we did not face any error. And also please ensure whether you have added System namespace reference in your xaml code. Please find the code snippet, sample and video for the same from the following location. 
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf"   x:Class="WpfApp1.MainWindow" 
        Title="MainWindow" Height="450" Width="800"> 
        <syncfusion:CalendarEdit Grid.Column="0" Grid.Row="0"  
                <syncfusion:BlackoutDatesRange StartDate="1/01/1900" EndDate="{x:Static system:DateTime.Today}"/> 
                <syncfusion:BlackoutDatesRange StartDate="1/20/2019" EndDate="2/13/2020"/> 

Please try the above solution and let us know if it is helpful.  
Arulraj A 

Luis Angel Valencia
Replied On January 11, 2019 01:55 PM UTC

Well this worked this morning, that was weird...

anyway, thank you very much...

another question 

<syncfusion:BlackoutDatesRange StartDate="1/21/2019" 

How can i make the calendar to have endless range with blackoutdatesrange?, i dont want to put EndDate="2/13/2100"


Jagadeesan Pichaimuthu [Syncfusion]
Replied On January 14, 2019 08:12 AM UTC

Hi Luis,   
Thanks for using Syncfusion product.  
Currently our CalendarEdit control doesn't have support to select range of dates without using end date property of blackoutdates. If we set maximum date as end date of blackoutdates, we can select the range of dates till the maximum date. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon