Add more ranges for BlackoutDatesRange
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?
SIGN IN To post a reply.
3 Replies
AA
Arulraj A
Syncfusion Team
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"
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>
|
Sample: http://www.syncfusion.com/downloads/support/forum/141932/ze/CalendarEdit-sample762943011.zip
Please try the above solution and let us know if it is helpful.
Regards,
Arulraj A
LA
Luis Angel Valencia
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
JP
Jagadeesan Pichaimuthu
Syncfusion Team
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
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
LA Luis Angel Valencia
- Jan 10, 2019 10:01 PM UTC
- Jan 14, 2019 08:12 AM UTC