Remove Times from time Picker

6 posts, 0 answers
  1. Philip
    Philip avatar
    69 posts
    Member since:
    Mar 2016

    Posted 11 Mar Link to this post

    I am using the date time picker to display apointment times what I was wanting to do was remove times that where booked with the radscheduler I no this would be custom code but is their any pointers on how to remove items from time time picker element of date time ?.
  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 11 Mar Link to this post

    Hello Phillip,

    The RadTimePicker control supports using custom collection to define the available times. Check out the following article that describes the functionality in more detail:



    Regards,
    Viktor Tachev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Philip
    Philip avatar
    69 posts
    Member since:
    Mar 2016

    Posted 12 Mar Link to this post

    I have submit a ticket would i get an example of how do bind to appointments to remove only add in times aviable within a given start time and end time
  5. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 14 Mar Link to this post

    Hello Philip,

    The following code snippets illustrate how you can set custom times for the RadTimePicker control:


    <telerik:RadTimePicker runat="server" ID="RadTimePicker1"></telerik:RadTimePicker>
     
    <asp:Button ID="Button1" Text="Set times in picker" runat="server" OnClick="Button1_Click" />


    public DateTime[] GetTimes()
    {
        // get info from database
     
        List<DateTime> times = new List<DateTime>();
     
        times.Add(new DateTime(2016, 1, 1, 12, 00, 00));
        times.Add(new DateTime(2016, 1, 1, 12, 20, 00));
        times.Add(new DateTime(2016, 1, 1, 13, 10, 00));
        times.Add(new DateTime(2016, 1, 1, 14, 30, 00));
     
        return times.ToArray();
    }
     
    protected void Button1_Click(object sender, EventArgs e)
    {
        RadTimePicker1.TimeView.CustomTimeValues = GetTimes();
     
    }

    I am also attaching a sample page where the approach is implemented.

    Regards,
    Viktor Tachev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  6. Philip
    Philip avatar
    69 posts
    Member since:
    Mar 2016

    Posted 14 Mar in reply to Viktor Tachev Link to this post

    Hi Mate thanks very much now they have asked me can the radseculer apppointments also be customised as well. Ie here i want the abilitie to remove times from the Sceduler as well its so an introducer can see what times are available during a day can the same process be used , I have tried the examples of adding people basicaly their are 5 managers and they need to see what slots each has avaiblable.

     

     

  7. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 15 Mar Link to this post

    Hello Philip,

    If you have a query for customizing the RadScheduler control please submit a separate ticket or thread for it.

    This way the information in the threads will be kept consistent and will be easier to find for someone with similar scenario.

    Regards,
    Viktor Tachev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017