Hallo,
ich stehe mit jquery mal wieder auf Kriegsfuß. Ich habe ein formular mit mehrere Inputfelder und möchte mit datepicker bzw. timepicker einen Datum bzw. eine uhrzeit auswählen.
Mein Formular:
<form class="form-horizontal" role="form" id='frm_addAppointment_type' name='frm_addAppointment_type'>
<div class="modal-body">
<div class="form-group">
<label for="frm_lbl_day" class="col-sm-2 control-label">Date</label>
<div class="col-sm-8 required">
<input type='text' name='frm_appointmentday' id='frm_appointmentday' value='' onchange="myFunction()">
</div>
</div>
<div class="form-group">
<label for="frm_lbl_descr" class="col-sm-2 control-label">Description</label>
<div class="col-sm-8 required">
<input name='frm_description' id='frm_description' value=''>
</div>
</div>
<div class="form-group">
<label for="frm_lbl_start" class="col-sm-2 control-label">Start</label>
<div class="col-sm-8 required">
<input type='text' name='frm_appointmentstart' id='frm_appointmentstart' value=''>
</div>
</div>
<div class="form-group">
<label for="frm_lbl_end" class="col-sm-2 control-label">End</label>
<div class="col-sm-8 required">
<input type='text' name='frm_appointmentend' id='frm_appointmentend' value='' >
</div>
</div>
<div class="form-group">
<label for="frm_lbl_delay" class="col-sm-2 control-label">Delay</label>
<div class="col-sm-8 required">
<input type='text' name='frm_delay' id='frm_delay' value=''>
</div>
</div>
<div class="form-group">
<label for="frm_lbl_logoname" class="col-sm-2 control-label">Logoname</label>
<div class="col-sm-8 required">
<input type='text' name='frm_logoname' id='frm_logoname' value=''>
</div>
</div>
<div class="form-group">
<label for="frm_lbl_docname" class="col-sm-2 control-label">Docname</label>
<div class="col-sm-8 required">
<input type='text' name='frm_docname' id='frm_doconame' value=''>
</div>
</div>
<div class="form-group">
<label for="frm_lbl_deadline" class="col-sm-2 control-label">Deadline</label>
<div class="col-sm-8 required">
<p>
<input type='text' name='frm_deadline_date' id='frm_deadline_date' value=''>
<input type='text' name='frm_deadline_time' id='frm_deadline_time' value=''>
</p>
</div>
</div>
<div class="form-group">
<label for="frm_lbl_pause" class="col-sm-2 control-label">Pause</label>
<div class="col-sm-8 required">
<input type='checkbox' name='frm_pause' id='frm_pause' value='1'>
</div>
</div>
<div class="form-group reveal-if-active">
<label for="frm_lbl_pausestart" class="col-sm-2 control-label">Pausestart</label>
<div class="col-sm-8 required">
<input type='text' name='frm_pausestart' id='frm_pausestart' value='' class="require-if-active" data-require-pair="#frm_pause">
</div>
</div>
<div class="form-group">
<label for="frm_lbl_pauseend" class="col-sm-2 control-label">Pauseend</label>
<div class="col-sm-8 required">
<input type='text' name='frm_pauseend' id='frm_pauseend' value='' class="require-if-active" data-require-pair="#frm_pause">
</div>
</div>
<div class="form-group">
<label for="frm_lbl_multiple" class="col-sm-2 control-label">Teilnehmerzahl</label>
<div class="col-sm-8 required">
<input type='text' name='frm_multiple' id='frm_multiple' value=''>
</div>
</div>
<input type='hidden' name='frm_tID' id='frm_tID' value=''>
<!-- Hier weitere forms-->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" id="add-appointment-type-save-btn" >Save</button>
</div>
</form>
$("#frm_appointmentstart").timepicker();
$("#frm_appointmentend").timepicker();
$("#frm_deadline_time").timepicker();
$("#frm_pausestart").timepicker();
$("#frm_pauseend").timepicker();
$( "#frm_appointmentday" ).datepicker();
$( "#frm_deadline_date" ).datepicker();
Nun soll die Auswahl mancher Felder durch die Auswahl anderer Felder limitiert werden, doch egal was für ein event ich auswähle, die funktion wird nicht ausgeführt.
$( "#frm_appointmentday" ).datepicker({
onchange: function() {
alert("test");
// $( "#frm_deadline_date" ).datepicker( "option", "minDate", selectedDate );
}
});
Kann mir bitte jemand sagen woran das liegt?
Vielen Dank
Amit