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

Urgent help related to appointment time while drag

3 Answers 48 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
hardik
Top achievements
Rank 1
hardik asked on 13 May 2011, 02:42 PM
Hi telerik.

Can you please reply me fast. Its very urgent.

When I drag the appointment at that time it shows the time in AM - PM format for appointment. I want it in 24 hour format.

I set  timeruler to 24 hour using

TimerulerMajorTickStringFormat="{}{0:%H}:{0:%m} "

So my scheduler is shown in 24 hour format. (Image - 1)

But when I dragged the appointment at that time Appointment Time is shows in AM-PM format.(Image-2). How can I set the appointment time to 24 hour also.

Thanks
Hardik

3 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 20 May 2011, 10:06 AM
Hello hardik,

You need to set the DragDropHighlightStyle property. Following is the default Style, you should modify it according your needs:

<Style x:Key="DragDropHighlightStyle" TargetType="local:HighlightItem">
    <Setter Property="Background" Value="{StaticResource DecorationRectangleBackground_DragOver}" />
    <Setter Property="BorderBrush" Value="{StaticResource DecorationRectangleOuterBorder_DragOver}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate>
                <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                    <Grid>
                        <Border BorderBrush="{StaticResource DecorationRectangleInnerBorder_DragOver}" BorderThickness="1" />
                        <Path Width="8" Height="8" Margin="-2" HorizontalAlignment="Left" VerticalAlignment="Top" Stroke="{StaticResource AppointmentResizeCueTopLeftMarkStroke}">
                            <Path.Data>
                                <GeometryGroup>
                                    <EllipseGeometry RadiusX="2" RadiusY="2" Center="2 2" />
                                    <LineGeometry StartPoint="3 3" EndPoint="8 8" />
                                </GeometryGroup>
                            </Path.Data>
                        </Path>

                        <TextBlock x:Name="StartTextBox" Margin="4 2" Foreground="{StaticResource RadScheduleForeground}" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Start,StringFormat=t}" />
                        <Path Width="8" Height="8" Margin="-2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Stroke="{StaticResource AppointmentResizeCueBottomRightMarkStroke}">
                            <Path.Data>
                                <GeometryGroup>
                                    <EllipseGeometry RadiusX="2" RadiusY="2" Center="6 6" />
                                    <LineGeometry StartPoint="0 0" EndPoint="5 5" />
                                </GeometryGroup>
                            </Path.Data>
                        </Path>

                        <TextBlock x:Name="EndTextBox" Margin="4 2" Foreground="{StaticResource RadScheduleForeground}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Text="{Binding End,StringFormat=t}" />
                    </Grid>
                </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

Kind regards,
Valeri Hristov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
hardik
Top achievements
Rank 1
answered on 23 May 2011, 08:29 AM
Thanks Admin,

I have set the style but not get the desired result.

<TextBlock x:Name="EndTextBox" Margin="4 2" Foreground="{StaticResource RadScheduleForeground}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Text="{Binding End,StringFormat=T}" />

I have set the stringFormat to "T" but still time shown in 12 hour format not in 24 hour format.

I have used converter also. But still get the same result "Time in 12 hour format" with AM - PM extension.


Thanks
Hardik
0
Valeri Hristov
Telerik team
answered on 25 May 2011, 10:33 AM
Hi hardik,

Try with this:

<TextBlock x:Name="EndTextBox" Margin="4 2" Foreground="Black" HorizontalAlignment="Right" VerticalAlignment="Bottom" Text="{Binding End,StringFormat='{}{0:HH:mm:ss}'}" />

Regards,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ScheduleView
Asked by
hardik
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
hardik
Top achievements
Rank 1
Share this question
or