Hi Team
I have a checkboxfor, but i want to select it using jquery to call datepicker. How do i achieve such from below meaning it must have time?
- <div class="form-check">
- <div class="col-xl-2">
- @Html.CheckBoxFor(model => model.Lockuntil, new { @class = "form-check-input" })
- <label class="form-check-label" for="@Html.IdFor(model=>model.Lockuntil)">Lockuntil</label>
- </div>
- </div>
-
- $( "#datepicker" ).datepicker({
- regional: "da",
- constrainInput: true,
- showWeek: true,
- showTime:true
- });
-
- $("#dataLocker").change(function() {
- if(this.checked) {
- $("#datepicker").prop("disabled",false);
- }else{
- $("#datepicker").prop("disabled",true);
- }
- });