Просмотр исходного кода

#4307 Birthday field isn't working properly on mobile

Alex Trofimov 3 лет назад
Родитель
Сommit
bfc625b9d4
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      inc/js/jquery.webForms.js

+ 2 - 0
inc/js/jquery.webForms.js

@@ -301,6 +301,7 @@
                 if (this.getAttribute("type") == "date" || this.getAttribute("type") == "date_calendar" || this.getAttribute("type") == "datepicker") { // Date picker
 
                     flatpickr(this, {
+                        disableMobile: true,
                         altInput: true,
                         altFormat: this.getAttribute("data-frmt-date") ? this.getAttribute("data-frmt-date") : "F j, Y",
                         dateFormat: "YYYY-MM-DD",
@@ -314,6 +315,7 @@
                 } else if(this.getAttribute("type") == "datetime" || this.getAttribute("type") == "date_time") { // DateTime picker
 
                     var oPickerOptions = {
+                        disableMobile: true,
                         enableTime: true,
                         altInput: true,
                         altFormat: this.getAttribute("data-frmt-date") ? this.getAttribute("data-frmt-datetime") : "D MMM YYYY h:mma",