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

[Solved] DateTimePicker problem

6 Answers 198 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeff Tang
Top achievements
Rank 1
Jeff Tang asked on 19 Nov 2008, 02:07 AM
If I only use the DateView to selected a date (eg. 19 Nov 2008), the textbox will display 19/11/2008 00:00 in which the time will be default 00:00 if I haven't specific it, how can I set this default value to a specific time.(eg. 23:59)

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 19 Nov 2008, 04:53 AM
Hi Jeff,

Please add the following JavaScript in order to achieve desired functionality.

JavaScript:
<script type="text/javascript"
        var isTimeSelected = false
         
        function DateSelected(sender, args) 
        { 
            if (!isTimeSelected) 
                sender.get_timeView().setTime(23, 59, 0); 
                 
            isTimeSelected = false
        } 
        function ClientTimeSelected(sender, args) 
        { 
            isTimeSelected = true
        } 
</script> 


ASPX:
<telerik:RadDateTimePicker ID="RadDateTimePicker1" runat="server"
            <ClientEvents OnDateSelected="DateSelected" /> 
            <TimeView OnClientTimeSelected="ClientTimeSelected"
            </TimeView> 
</telerik:RadDateTimePicker> 



Thanks,
Shinu.
0
Jeff Tang
Top achievements
Rank 1
answered on 19 Nov 2008, 08:28 AM
Your solution work fine to me. Thank You.
0
Randy
Top achievements
Rank 1
answered on 08 Mar 2010, 06:58 PM
On my page load event I am trying to set my DateTimePicker control to let's say 1/1/2010 23:59:59.  Now I have a datetime variable set to this and I set it to the SelectedDate property of the control.  Now why is the control have 1/1/2010 12:00:00???  even though I set it?  Am I missing something?  How can i set the time in the code behind?
0
Sebastian
Telerik team
answered on 09 Mar 2010, 10:30 AM
Hello Randy,

From your downloads history I see that you are using an internal build of RadControls for ASP.NET AJAX downloaded after the Q3 2009 release. Can you please check whether everything is working properly after migrating to the 2009.3.1314 version of the suite (Q3 2009 SP2)? Upgrade instructions are available here.

Best regards,
Sebastian
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
Randy
Top achievements
Rank 1
answered on 09 Mar 2010, 04:44 PM
Thank you for your reply, unfortunately, my Telerik Download page only indicates that Latest Version: 2009.2 826 (Aug 26, 2009) is the latest version for me to download.  The only other option I have is to download 3.1016 version which tells me that it is beta.  Is this a problem with my download page, can you verify this?  Thank you. 
0
Sebastian
Telerik team
answered on 12 Mar 2010, 11:04 AM
Hello Randy,

You can test with a trial version from the latest release (2010.1.309) to compare the behavior and determine whether the issue comes from a particular implementation or is originating from the source code of the control. Let me know what your findings are.

You may also post the entire code related to your date time picker configuration for further examination.

Kind regards,
Sebastian
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
General Discussions
Asked by
Jeff Tang
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Jeff Tang
Top achievements
Rank 1
Randy
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or