calendar.phtml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. ?>
  7. <?php
  8. /**
  9. * Calendar localization script. Should be put into page header.
  10. *
  11. * @see \Magento\Framework\View\Element\Html\Calendar
  12. */
  13. ?>
  14. <script>
  15. require([
  16. "jquery",
  17. "jquery/ui"
  18. ], function($){
  19. //<![CDATA[
  20. $.extend(true, $, {
  21. calendarConfig: {
  22. dayNames: <?= /* @escapeNotVerified */ $days['wide'] ?>,
  23. dayNamesMin: <?= /* @escapeNotVerified */ $days['abbreviated'] ?>,
  24. monthNames: <?= /* @escapeNotVerified */ $months['wide'] ?>,
  25. monthNamesShort: <?= /* @escapeNotVerified */ $months['abbreviated'] ?>,
  26. infoTitle: "<?= /* @escapeNotVerified */ __('About the calendar') ?>",
  27. firstDay: <?= /* @escapeNotVerified */ $firstDay ?>,
  28. closeText: "<?= /* @escapeNotVerified */ __('Close') ?>",
  29. currentText: "<?= /* @escapeNotVerified */ __('Go Today') ?>",
  30. prevText: "<?= /* @escapeNotVerified */ __('Previous') ?>",
  31. nextText: "<?= /* @escapeNotVerified */ __('Next') ?>",
  32. weekHeader: "<?= /* @escapeNotVerified */ __('WK') ?>",
  33. timeText: "<?= /* @escapeNotVerified */ __('Time') ?>",
  34. hourText: "<?= /* @escapeNotVerified */ __('Hour') ?>",
  35. minuteText: "<?= /* @escapeNotVerified */ __('Minute') ?>",
  36. dateFormat: $.datepicker.RFC_2822,
  37. showOn: "button",
  38. showAnim: "",
  39. changeMonth: true,
  40. changeYear: true,
  41. buttonImageOnly: null,
  42. buttonImage: null,
  43. showButtonPanel: true,
  44. showWeek: true,
  45. timeFormat: '',
  46. showTime: false,
  47. showHour: false,
  48. showMinute: false
  49. }
  50. });
  51. enUS = <?= /* @escapeNotVerified */ $enUS ?>; // en_US locale reference
  52. //]]>
  53. });
  54. </script>