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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Add more ranges for BlackoutDatesRange

Thread ID:

Created:

Updated:

Platform:

Replies:

141932 Jan 10,2019 10:01 PM UTC Jan 14,2019 08:12 AM UTC WPF 3
loading
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" 
                                         x:Name="calendarEdit" 
                                         VerticalAlignment="Center"
                                         HorizontalAlignment="Center"
                                         Width="350"
                                         Height="300">                   
                    <syncfusion:CalendarEdit.BlackoutDates>                                 
                            <syncfusion:BlackoutDatesRange StartDate="1/01/1900" 
                                                       EndDate="{x:Static sys:DateTime.Today}"/>

                            <syncfusion:BlackoutDatesRange StartDate="1/20/2019" 
                                                       EndDate="2/13/2020"/>
                    </syncfusion:CalendarEdit.BlackoutDates>
</syncfusion:CalendarEdit>


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. 
 
<Window 
        xmlns:local="clr-namespace:WpfApp1" 
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf"   x:Class="WpfApp1.MainWindow" 
        mc:Ignorable="d"  
        xmlns:system="clr-namespace:System;assembly=mscorlib" 
        Title="MainWindow" Height="450" Width="800"> 
    <Grid>                                
        <syncfusion:CalendarEdit Grid.Column="0" Grid.Row="0"  
                                         x:Name="calendarEdit"  
                                         VerticalAlignment="Center" 
                                         HorizontalAlignment="Center" 
                                         Width="350" 
                                        Height="300"> 
            <syncfusion:CalendarEdit.BlackoutDates> 
                <syncfusion:BlackoutDatesRange StartDate="1/01/1900" EndDate="{x:Static system:DateTime.Today}"/> 
 
                <syncfusion:BlackoutDatesRange StartDate="1/20/2019" EndDate="2/13/2020"/> 
            </syncfusion:CalendarEdit.BlackoutDates> 
        </syncfusion:CalendarEdit> 
    </Grid> 
</Window> 
 
 

 
 
Please try the above solution and let us know if it is helpful.  
 
Regards, 
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" 
                                                       EndDate="2/13/2100"/>

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


Thankssss


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. 
 
Regards, 
Jagadeesan 


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.

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

;