Get DateTime From Scheduler Ruler Click

3 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    6 posts
    Member since:
    Oct 2018

    Posted 30 Apr Link to this post

    Is there any way to double click the ruler and get the time at the point of the cursor click, in order to schedule a new appointment at that time?  When the schedule gets crowded, it's easier to click on the ruler versus finding an empty spot at the desired time to click.

  2. Jonathan
    Jonathan avatar
    6 posts
    Member since:
    Oct 2018

    Posted 30 Apr Link to this post

    I figured out a solution:

     

    Private Sub RadScheduler1_MouseClick(sender As Object, e As MouseEventArgs) Handles RadScheduler1.MouseClick

    If e.X < RadScheduler1.GetDayView().RulerWidth Then
                    Dim point = New Point(RadScheduler1.GetDayView().RulerWidth + 1, e.Y)
                    Dim cellDate = SchedulerUIHelper.GetCellAtPoint(point, RadScheduler1).Date()
                   
    End If

    End Sub

  3. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3217 posts

    Posted 01 May Link to this post

    Hello, Jonathan,     

    I am glad that the problem you were facing is now resolved. Indeed, the SchedulerUIHelper.GetCellAtPoint method is suitable for extracting the SchedulerCellElement at a certain location and then gets its date. 

    If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top