Dropdown time for datepicker?

Discussion in 'jQuery' started by wll6568, Aug 18, 2013.

  1. #1
    I am using the DateTimePicker, but instead of having the time slider, is it possible to have a dropdown with three pre-selected time for it?
    e.g.
    <select>
    <option value="12:00">Lunch time</option>
    <option value="14:30">Late lunch</option>
    <option value="17:30">Evening time</option>
    </option>
    <asp:TextBox ID="txtDateTime" runat="server" />

    <script type="text/javascript">
    $(document).ready(function () {
    $('#<%=txtDateTime.ClientID%>').datetimepicker({
    dateFormat: 'dd/mm/yy',
    timeFormat: 'HH:mm'
    });
    });
    </script>
     
    wll6568, Aug 18, 2013 IP
  2. cLogik

    cLogik Active Member

    Messages:
    159
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    90
    #2
    I realize that this post is getting old. But since it's unanswered then i will answer it anyway. You can accomplish something similar to what your trying.

    jsFiddle: http://jsfiddle.net/gvAbv/13/
     
    cLogik, Sep 3, 2013 IP