Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- date-picker:
- js:
- script/site-datepicker.js : {}
- dependencies:
- - core/jquery
- - core/jquery.ui.datepicker
- Drupal.behaviors.customDatepicker = {
- attach: function (context, settings) {
- jQuery(function () {
- jQuery("#datepicker").datepicker({
- dateFormat: "dd-mm-yy",
- altField: "input[data-drupal-selector=edit-created]",
- altFormat: "yy/mm/dd 23:59:59"
- });
- });
- }
- };
- {% if q is not empty %}
- {#
- This ensures that, if clean URLs are off, the 'q' is added first,
- as a hidden form element, so that it shows up first in the POST URL.
- #}
- {{ q }}
- {% endif %}
- <input id="datepicker" type="text">
- <input data-drupal-selector="edit-created" data-msg-maxlength="This field field has a maximum length of 128." name="created" size="30" maxlength="128" aria-invalid="false" type="hidden">
- {{ form|without('created') }}
Add Comment
Please, Sign In to add comment