danon_13,
$(document).ready(function() {
var datepicker;
$("#form").change(function() {
if (this.value == "data_otch" && datepicker) $(".for").html("").append(datepicker);
else if ($("#datepicker-default").length) {
datepicker = $("#datepicker-default").detach();
$(".for").html('<input name="filtr" value="" class="form-control input-sm" id="" type="text">')
}
}).val("data_otch")
});