Calendar click event

How I can set start_time and end_time on doc when I click on a cell of calendar view.
For instance, in calendar “Event”, when you click on a cell it populates start_date and end_date.
I want add the same behaviour on a my doctype

Check it.

Thank you it works