Guest User

Untitled

a guest
May 23rd, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. date-picker:
  2. js:
  3. script/site-datepicker.js : {}
  4. dependencies:
  5. - core/jquery
  6. - core/jquery.ui.datepicker
  7.  
  8. Drupal.behaviors.customDatepicker = {
  9. attach: function (context, settings) {
  10. jQuery(function () {
  11. jQuery("#datepicker").datepicker({
  12. dateFormat: "dd-mm-yy",
  13. altField: "input[data-drupal-selector=edit-created]",
  14. altFormat: "yy/mm/dd 23:59:59"
  15. });
  16. });
  17. }
  18. };
  19.  
  20. {% if q is not empty %}
  21. {#
  22. This ensures that, if clean URLs are off, the 'q' is added first,
  23. as a hidden form element, so that it shows up first in the POST URL.
  24. #}
  25. {{ q }}
  26. {% endif %}
  27.  
  28. <input id="datepicker" type="text">
  29. <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">
  30. {{ form|without('created') }}
Add Comment
Please, Sign In to add comment