RadDateTimePicker

6 posts, 0 answers
  1. Louis
    Louis  avatar
    44 posts
    Member since:
    Sep 2007

    Posted 01 Oct 2007 Link to this post

    This control seem's to be deactivated on my form. Even when i set the focus on, nothing seem's to change, it remains grey. Is this the normal style? If yes how can i set the style so it is like a normal control ie : when focused the selected text is blue and so on...
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 02 Oct 2007 Link to this post

    Hi Louis,

    Thank you for your question.

    Before getting to your question, I wanted to say that we are quite surprised by the adoption of this control by our customers. RadDateTimePicker was one of the most requested controls that we were lacking in the suite, but we did not expect this level of interest in it. Let me give you a little history on the control:

    RadDateTimePicker
     was created to cover for the date/time picking functionality that is needed for a feature-rich RadCalendar. It is not an official control yet, because it still lacks the API, documentation and examples to make it a full blown control. As a matter of fact, we have not announced it in the Q2 2007 Release Notes, because the control was intended to be used with RadCalendar only.

    It nevertheless appears in the VS ToolBox and I guess this fact alone is enough for you guys to start using it :). Why did we separate it from RadCalendar? Because it will be included in the WinForms suite at one point or another any way. So, we decided to blog that the DateTimePicker "comes as a bonus and demonstrates our willingness to deliver more than expected". Well, since the expectations about this control are very high, we will add some basic functionality to it in Q2 service packs, but will classify it as a beta, so that we do not raise our customer's expectations too high on its features at this time.

    RadDateTimePicker will be officially released as a stand alone control in Q3 of RadControls for WinForms. With the Q3 release we will provide masked edit functionality as well, and then you will be able to change the fore color of the text box as it would be editable. 

    I hope this sheds some light on the latest addition to RadControls for WinForms.

    Feel free to write back in case you have any questions.
     

    Greetings,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Arni
    Arni avatar
    17 posts
    Member since:
    Oct 2008

    Posted 11 Nov 2008 Link to this post

                   I am doing  a module calulating the work time of Emplyers set two Rddatetimepickers controls and calulate the time
    I hv dn the function caluculationg the time difference  using Timespan and its working Properly.
                But I need to set validation to these controls Where the raddatetimepicker1 having the ateformat dd/MM/yyy HH:ss:mm and Start from curent date second Raddatetime picker should have the time greater than the starting time  atleast one min.How To set the calidation for these case.
    kindly help me to validation these conr\trols and can send reference helplinks  fr this pblm. 
     Thank u all in Advance
  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 18 Nov 2008 Link to this post

    Hello Arni,

    Have you tried to compare the DateTime values which you have in the datetimepickers? Every DateTimePicker has a Value property and you can use the following comparison: date1 < date2. You have also ValueChanging and ValueChanged events of the RadDateTimePickerElement which you can easily handle and make the appropriate comparisons. For example subscribe to the ValueChanging events and save the current values of your datetimepickers. Then in the ValueChanged compare the values and if the result isn't valid you can easily make Undo as you have the old values.

    Please contact me if you have any problems with the implementation.

    Greetings,
    Boyko Markov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Arni
    Arni avatar
    17 posts
    Member since:
    Oct 2008

    Posted 20 Nov 2008 Link to this post

     hello Boyko Markov ,
     I tried with with  the DAtetime picker Using the Simply  Javascript code
    function StartDateSelected(sender, e)  
    {  
    var picker2 = $find("<%=RadDateTimePicker2.ClientID%>");  
    var calendar1 =document.getElementById("<%=RadDateTimePicker1.ClientID%>").value;  
    var calendar2 =document.getElementById("<%=RadDateTimePicker2.ClientID%>").value;  
        if (calendar2.length!=0)  
        {  
    DateSelected();  
           
        }  
        else  
        {  
          picker2.get_dateInput().focus();       
        }  
    }  
     
    function DateSelected(sender, e)  
    {  
    var picker1 = $find("<%=RadDateTimePicker1.ClientID%>");  
    var picker2 = $find("<%=RadDateTimePicker2.ClientID%>");  
    var calendar1 =document.getElementById("<%=RadDateTimePicker1.ClientID%>").value;  
    var calendar2 =document.getElementById("<%=RadDateTimePicker2.ClientID%>").value;  
      if ( calendar1.length!= 0 )  
     {  
        if(calendar1 > calendar2)  
           {  
           radalert("End Date Should Not be less from the Start Date",250,100,"Error Mesg");  
                        return false;  
           }  
          else if(calendar2 == calendar1)  
        {  
           radalert("End Time Should Not be less from the Start Time",250,100,"Error Mesg");  
            return false;  
        }  
       else if(calendar1 < calendar2)  
          {  
          
          }  
     }  
     else  
       
       radalert("PLease Insert Start Date");  
       picker1.get_dateInput().focus();    
          
    }  

    and called these functions to the Datetime pickers ..using Client Events under on dateselected Events for  both the controls

    <

     

    ClientEvents __designer:dtid="281474976710672" OnDateSelected ="StartDateSelected" />//for the Start time
    <ClientEvents __designer:dtid="281474976710672" OnDateSelected ="DateSelected" /> // For the End time..
    I could setthe validation of the dates..

     

    protected void DayTimeworked()   
    {  
    string st1 = RadDateTimePicker1.DbSelectedDate.ToString();   
    string st2 = RadDateTimePicker2.DbSelectedDate.ToString();   
    DateTime dt3 = Convert.ToDateTime(st1);   
    DateTime dt4 = Convert.ToDateTime(st2);   
    TimeSpan tsp1 = dt4.Subtract(dt3);   
    Label5.Text = tsp1.Days.ToString() +   
    ":" + tsp1.Hours.ToString() + ":" + tsp1.Minutes.ToString() + ":" + tsp1.Seconds.ToString();   
    }  
    protected void RadDateTimePicker1_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)   
    {  
    if(RadDateTimePicker1.SelectedDate != null)   
    {  
    if (RadDateTimePicker2.SelectedDate != null)   
    {  
    DayTimeworked();  
    }  
    }  
    else    
    Label5.Visible =   
    false;   
    }  
    like this way i hv done  calulating the time difference and validation for the datetime picker control.Finaly I done it .  
    Any one can Suggest If the same  events can handled easier .   
    Thank  U  MR.Boyko Markov  

     

     

     


  7. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 24 Nov 2008 Link to this post

    Hi Arni,

    Thank you about writing me. However I think your question is not for the RadDateTimePicker for WinForms product. I think you should post your ticket to the ASP.NET AJAX forum.  Here is a link to the calendar control's forum for ASP.NET AJAX - calendar forum

    I hope this helps.

    Please do not hesitate to contact me again if you have any questions regarding RadControls for WinForms.

    Sincerely yours,
    Boyko Markov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for WinForms is Visual Studio 2017 Ready