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

Message StartEndDatePicker.EndPicker

5 Answers 121 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
Thiago Ferreira
Top achievements
Rank 1
Thiago Ferreira asked on 22 Mar 2011, 09:17 PM
Hello,

I use 2 DateTimePicker, and i set the property "telerik:StartEndDatePicker.EndPicker". I'd like to disable the message "The end date you enterd occurs before the start date.". How can i do this?

Thanks

5 Answers, 1 is accepted

Sort by
0
Thiago Ferreira
Top achievements
Rank 1
answered on 24 Mar 2011, 03:54 PM
Someone can help me?
I need to solve this with some urgency.
0
Yana
Telerik team
answered on 24 Mar 2011, 04:33 PM
Hi Thiago,

We don't recommend using StartEndDatePicker.EndPicker property outside RadScheduler.  You can check this example  about data validation of RadDateTimePicker control.

Regards,
Yana
the Telerik team
0
Thiago Ferreira
Top achievements
Rank 1
answered on 24 Mar 2011, 05:21 PM

Hi Yana,

But i'd like to disable de manssage when i use StartEndDatePicker.EndPicker property inside RadScheduler.
Because, i'm using this template . Are there some property that i need to set in this part?

<Grid DataContext="{TemplateBinding EditedAppointment}" Background="{TemplateBinding Background}" Width="430" Height="300">
                            <Grid.RowDefinitions>
                               <RowDefinition Height="Auto" />
                               <RowDefinition Height="Auto" />
                               <RowDefinition Height="Auto" />
                               <RowDefinition Height="Auto" />
                               <RowDefinition Height="*" MinHeight="100" />
                               <RowDefinition Height="Auto" />
                           </Grid.RowDefinitions>
                           <Grid.ColumnDefinitions>
                               <ColumnDefinition Width="Auto" MinWidth="100" />
                               <ColumnDefinition Width="*" MinWidth="315"/>
                           </Grid.ColumnDefinitions>
  
                           <Label Target="{Binding ElementName=Subject}" Content="Subject" />
                           <TextBox x:Name="Subject" Grid.Column="1" TabIndex="0" Text="{Binding Path=Subject}" MaxLength="255" Margin="10, 10, 20, 2" />
  
                           <Label Grid.Row="1" Target="{Binding ElementName=StartDateTime}" Content="Start" />
                           <telerik:DateTimePicker x:Name="StartDateTime" Grid.Row="1"  Grid.Column="1" Margin="10, 10, 0, 2"
                                      IsEnabled="False"  SelectedDateTime="{Binding Path=Start, Mode=TwoWay}" telerik:StartEndDatePicker.EndPicker="{Binding ElementName=EndDateTime}" />
  
                           <Label Grid.Row="2" Target="{Binding ElementName=EndDateTime}" Content="End" />
                           <telerik:DateTimePicker x:Name="EndDateTime"   Grid.Row="2" Grid.Column="1" Margin="10, 10, 0, 2"
                                     IsEnabled="False"    SelectedDateTime="{Binding Path=End, Mode=TwoWay}" />
  
                           <CheckBox Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left"
                   IsChecked="{Binding Path=IsAllDayEvent}" Margin="10, 10, 0, 2" x:Name="allDayEventCheckbox"  IsEnabled="False" Content="All day event"></CheckBox>
  
                           <Label Grid.Row="4" Target="{Binding ElementName=Body}" Content="Body" />
                           <TextBox Name="Body" Grid.Row="4"  Grid.Column="1" Text="{Binding Path=Body}" TextWrapping ="NoWrap"
                ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"
                AcceptsReturn="true" AcceptsTab="True" Margin="10, 10, 20, 2" />
                            
                           <StackPanel Grid.Row="5" Grid.Column="1" Orientation="Horizontal" Margin="10, 10, 0, 10">
                               <Button Command="telerik:RadSchedulerCommands.SaveAppointment" Content="Save and Close" />
                               <Button Command="telerik:RadSchedulerCommands.EditRecurrenceRule" Margin="10, 0, 0, 0" Content="Edit recurrence" />
                               <Button Command="telerik:RadSchedulerCommands.EditParentAppointment" Margin="10, 0, 0, 0" Content="Edit parent" />
                           </StackPanel>
</Grid>


I'm using WPF controls not SilverLight controls like your example.
Thank you
0
Thiago Ferreira
Top achievements
Rank 1
answered on 28 Mar 2011, 07:32 PM
Yana?? Did you forget my problem??
I need your help!
0
Accepted
Yana
Telerik team
answered on 29 Mar 2011, 02:37 PM
Hello Thiago Ferreira,

This message in the RadScheduler is internally set and cannot be easily overridden. You can replace scheduler datepickers with RadDatePickers in the template. I've attached an example to demonstrate the approach. Please try it and let us know how it goes.

Regards,
Yana
the Telerik team
Tags
DateTimePicker
Asked by
Thiago Ferreira
Top achievements
Rank 1
Answers by
Thiago Ferreira
Top achievements
Rank 1
Yana
Telerik team
Share this question
or