Search code examples
jquerytimepicker

Removing jquery timepicker


I am using this timepicker: http://labs.perifer.se/timedatepicker/ for one of my intrasite I am enabling the timepicker as mentioned in the example by using

<select id="change_type">
    <option value="1">Time</option>
    <option value="2">Text</option>
</select>
<input type="text" id="time1" size="10">
$("#time1").timePicker();

Based on a dropdown list I want to make the field time1 as either time/simple text. Is there a way where I can remove the time picker to make the field as simple text?

TIA

Bittu


Solution

  • I would try using Javascript to simply remove the #time1 field then add in a new one with the same ID, setting its value (and any attributes) to the same as the original.