Skip to content

Commit 97f3f84

Browse files
Mention that we are using Bootstrap Datepicker
1 parent 4d66b50 commit 97f3f84

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

reference/forms/types/date.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,16 @@ make the following changes::
101101
'attr' => ['class' => 'js-datepicker'],
102102
));
103103

104-
Assuming you're using jQuery, you can initialize the date picker via:
104+
Then, add the following JavaScript code in your template to initialize the date
105+
picker:
105106

106107
.. code-block:: html
107108

108109
<script>
109110
$(document).ready(function() {
111+
// you may need to change this code if you are not using Bootstrap Datepicker
110112
$('.js-datepicker').datepicker({
111-
dateFormat: 'yy-mm-dd'
113+
format: 'yyyy-mm-dd'
112114
});
113115
});
114116
</script>

0 commit comments

Comments
 (0)