How to show Date and Time popup together in RadDateTimePicker

2 posts, 0 answers
  1. Mahen
    Mahen avatar
    1 posts
    Member since:
    Apr 2009

    Posted 12 Jun 2013 Link to this post

    Hi,

    We have an application built in Silverlight, in it we are using RadDateTimePickerControl for Silverlight which shows Date and time together in the popup windows.

    We also have few ASP.Net pages which we are showing in the above Silverlight application.

    In ASP.net pages we are also using the RadDateTimePickercontral for ASP.net but in it Date and Time comes as separate selectable icons and user has to click date icon to select date and clock icon to select time.

    We want both the control to behave same for consistency.
    Could you suggest some approch or way to make the ASP.net RadDateTimePickerControl to behave same as Silverlight RadDataTimePickerControl.

    Thanks and Regards,
    Nitin Garg

  2. Kostadin
    Admin
    Kostadin avatar
    1708 posts

    Posted 17 Jun 2013 Link to this post

    Hi Mahen,

    A possible solution is to hide the buttons and on input focus to open the date selection. After selecting a date you could show the time selection. Check out the following code snippet.
    ASPX:
    <telerik:RadDateTimePicker ID="RadDateTimePicker1" runat="server" ShowPopupOnFocus="true"
        DatePopupButton-Visible="false" TimePopupButton-Visible="false">
        <DateInput runat="server" OnClientDateChanged="DateChange"></DateInput>
    </telerik:RadDateTimePicker>
    JavaScript:
    <script type="text/javascript">
        function DateChange(sender, args) {
            $find("<%= RadDateTimePicker1.ClientID %>").showTimePopup();
        }
    </script>

    I hope this helps.

    Regards,
    Kostadin
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top