Skip to content
Loading
  • Amit Kumar
    0
    Hi, You can do it like this.
    For more details : https://www.aspforums.net/Threads/177880/Display-Date-and-Current-Time-when-a-date-is-selected-in-AJAX-CalendarExtender-control-in-ASPNet/
    0
  • Rajeesh Menoth
    0
    Hi,
     
    Please check the following article with source code and demo.
     
    https://www.aspsnippets.com/Articles/AJAX-Calendar-Extender-control-with-Time-in-ASPNet.aspx 
     
    Demo :
     
    https://www.aspsnippets.com/demos/361/ 
    0
  • Amit Kumar
    0
    Hi, You can do it very quickly and easy way go through the below link. https://www.aspforums.net/Threads/177880/Display-Date-and-Current-Time-when-a-date-is-selected-in-AJAX-CalendarExtender-control-in-ASPNet/
    0
  • Amit Mohanty
    0
    You can set the format as "yyyy-MM-dd". After the user select the date in calendar, it will return 2019-08-16 for example. In the date selected event, you can append the current time after the date returned.

    OnClientDateSelectionChanged="SelectDate"

    1. function SelectDate(ev)  
    2. {  
    3.         var calendarBehavior1 = $find("Calendar1");  
    4.         var d = calendarBehavior1._selectedDate;  
    5.         var now = new Date();  
    6.         calendarBehavior1.get_element().value = d.format("yyyy-MM-dd") + " "+now.format("HH:mm:ss")  
    7. } 
    0