I have a bootstrap modal which consists of a select dropdown.
And on it's change, there is a datetimepicker that appears. Like if selected option is hours, hours will be shown else datetime.
Now, I am facing an issue clearing all these values from the modal on modal close.
I tried doing it by :
$("#shareLocationModal").on("hidden.bs.modal", function()
{
$("#sendDropDownOptions option").text('Now')
});
The issue here is that all the options get changed to now.
I need to reset the contents of the select dropdown on modal close, like on modal open, selected option by default is Now against send and in expiry, selected option is Datetimeexp and also would like to maintain the input types, like input type has class hide on now etc as shown in fiddle.
Here is a fiddle : Fiddle