Guest User

Untitled

a guest
Oct 19th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. $form['arrival_date'] = [
  2. '#type' => 'date_popup',
  3. '#title' => t('Arrival date'),
  4. '#date_format' => 'd/m/Y',
  5. '#date_year_range' => '0:+1',
  6. '#date_label_position' => 'none',
  7. '#default_value' => '',
  8. '#size' => '10',
  9. ];
  10.  
  11. (function ($) {
  12.  
  13. Drupal.behaviors.ios2 = {
  14. attach: function (context, settings) {
  15. $('#edit-arrival-date-datepicker-popup-1').datepicker('option', {
  16. onClose: function (date) {
  17. // date will have the new date or empty string if no date
  18. // has been selected.
  19. alert(date);
  20. // Do something
  21. }
  22. });
  23. }
  24. };
  25.  
  26. })(jQuery);
  27.  
  28. $('#edit-arrival-date-datepicker-popup-1').datepicker({
  29.  
  30. (function ($) {
  31.  
  32. Drupal.behaviors.ios2 = {
  33. attach: function (context, settings) {
  34. $('#edit-arrival-date-datepicker-popup-1').datepicker({
  35. onClose: function (date) {
  36. // date will have the new date or empty string if no date
  37. // has been selected.
  38. alert(date);
  39. // Do something
  40. }
  41. });
  42. }
  43. };
  44.  
  45. })(jQuery);
Add Comment
Please, Sign In to add comment