jqueryasp.netmodalpopups

jquery timepicker inside ModalPopupExtender not update


I have a timepicker inside ModalPopupExtender

 $(document).ready(function () {
            $("#<%= txtTs.ClientID %>").timepicker({ 'timeFormat': 'h:i A' });
        });

I have a link button in gridview, after click the link ModalPopup showup, and txtTs(textbox) load the value from javascript. when click timepicker's dropdown showup. first time the selected value will be highlighted. If I closed the popup and choose another link from gridview. when ModalPopup showup the txtTs(textbox) will be loaded new value.But if click, timepicker's dropdown will highlighted last time selected value. How can I make its highlight bind to new value?


Solution

  • $("#<%= txtTs.ClientID %>").timepicker({
                    'timeFormat': 'h:i A',
                    'onSelect': function() {
    
                    $('#endTime').timepicker('option', 'minTime', $(this).val());                        
              }
            });