javascript - Bootstrap Datepicker attributes not being set -
I am trying to set the start date with autoclose with the datepicker automatically: true. However, it does not work
Can you please tell me what am I doing? I have code on jsfiddle
effective date: I have written for datepicker that the javascript is as follows:
jQuery (function () {var efDP = jQuery ("# effectivedate") ; EXDP.datepicker ("setdate", new date (date.N. () () () (), (), (), (), () ("#include"), jQuery ("# end Date "), Date Picker (" SetDate ", New Date (EffectDetate Time) + 259200000); jquery (" # expirationdate ") datepicker (" update ");});});
You are trying to update a non-existing datepicker on some lines first Are there. exDP.datepicker ({autoclose: true}); Creates a new example: You must set the option directly: jQuery (function () {var efDP = jQuery ("# effectiveness"). Recorder ({Autoclose: True}); var exDP = jQuery ("Date picture (" activated "); DeadDekers ({Autocalues: true}); FRPD DETApicor ('Set date', new date). DadePicker ('Update'); XPD Datapiker (Date) (date) (date) ('update');});});
Please take a look at the documents, this To eat, you can reuse objects from events. On the first line of your .on function, you are getting a string from the object ( .val () < / code>) and a date object again, it returns a date object (which can be reused). Easy coding, more readable and maintenance code.
Comments
Post a Comment