Open prakashjain opened 4 years ago
Hello,
can you clearfiy what you are going to achieve ?
the picker data name is HijriDatePicker
and you could use
$(element).removeData('HijriDatePicker');
if you want to destroy the datetime picker use the following
$("#hijri-date-input").data('HijriDatePicker').destroy();
Hope I get what you want to achieve
Thanks
Yes, same thing want to achieve. but the above code not working. Please see the below sample code. <!DOCTYPE html>
Below is an example form built entirely with Bootstrap’s form controls. Each required form group has a validation state that can be triggered by attempting to submit the form without completing it.
try to call this code alone and see if the datepicker get destoyed or not
$("#hijri-date-input").data('HijriDatePicker').destroy()
Thanks
Sorry for the late reply.
$("#hijri-date-input").data('HijriDatePicker').destroy()
Yes the above code working to destroy, but after destroy using below code to display Hijr Date picker
initHijrDatePicker();
But now showing. I would like to show/hide Hijr date picker based on selection on change called
initHijrDatePicker(); method but not showing calendar view.
Soon, we will improve the docs and list all features.
Hope you will find what are you looking for
Thanks
Hello,
Normal datepicker support below code to hide datepicker. $('#datepicker').datepicker("disable")
bootstrap-hijri-datetimepicker.js" lib picker.destroy function available: picker.destroy = function () { /// Destroys the widget and removes all attached event listeners hide(); detachDatePickerElementEvents(); element.removeData('DateTimePicker'); element.removeData('date'); };
$('#datepicker').datepicker("disable") o hide how to implement in hijriDatePicker() in custom js ? $(function () { $("#hijri-date-input").hijriDatePicker(); });