[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] UI/UX Clicking preview while creating a blogpost is showing Please enter...

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68b6f5b9553f5_2cdce9c3018b@gitlab-sidekiq-low-urgency-cpu-bound-v2-856cf6bcf7-8rqhh.mail>

Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
ee601b0c by David Maene at 2025-09-02T13:40:34+00:00
[FIX] UI/UX Clicking preview while creating a blogpost is showing Please enter a valide date when day value is greater than 12
---
* Removed the date class on inputs to prevent it from being used as a rule in input validation

* Loop on 'publish_' fields

* Class submission date for formatting in HtmlSelectDate.php | HtmlSelectTime.php

* Avoiding date as rule in tiki-blog_post.tpl

* Preventing date as rule in tiki-edit_submission.tpl

* [FIX] UI/UX Clicking preview while creating a blogpost is showing Please enter a valid [....]. for values grater than 12

* Added dynamic day validation method based on selected month and year

* RMV date in the class list to prevent it from being taken as a default rule in form validation

* RMV date in the class list to prevent it from being taken as a default rule in form validation

See merge request tikiwiki/tiki!7844

- - - - -


3 changed files:

- lib/smarty_tiki/FunctionHandler/HtmlSelectDate.php
- lib/smarty_tiki/FunctionHandler/HtmlSelectTime.php
- themes/base_files/scss/_tiki-miscellaneous_global.scss


Changes:

=====================================
lib/smarty_tiki/FunctionHandler/HtmlSelectDate.php
=====================================
@@ -223,7 +223,7 @@ class HtmlSelectDate extends Base
                 $month_values[$i] = $tikidate->format($month_value_format, true);
             }
 
-            $month_result .= '<select class="form-control date" name=';
+            $month_result .= '<select class="form-control date-time-selector-field" name=';
             if (null !== $field_array) {
                 $month_result .= '"' . $field_array . '[' . $prefix . 'Month]"';
             } else {
@@ -265,7 +265,7 @@ class HtmlSelectDate extends Base
                 $day_values[] = sprintf($day_value_format, $i);
             }
 
-            $day_result .= '<select class="form-control date" name=';
+            $day_result .= '<select class="form-control date-time-selector-field" name=';
             if (null !== $field_array) {
                 $day_result .= '"' . $field_array . '[' . $prefix . 'Day]"';
             } else {
@@ -321,7 +321,7 @@ class HtmlSelectDate extends Base
                     array_unshift($years, $year_empty);
                     array_unshift($yearvals, '');
                 }
-                $year_result .= '<select class="form-control date" name="' . $year_name . '"';
+                $year_result .= '<select class="form-control date-time-selector-field" name="' . $year_name . '"';
                 if (null !== $year_size) {
                     $year_result .= ' size="' . $year_size . '"';
                 }


=====================================
lib/smarty_tiki/FunctionHandler/HtmlSelectTime.php
=====================================
@@ -56,7 +56,7 @@ class HtmlSelectTime extends Base
         $minute_empty = null;
         $second_empty = null;
         $all_empty = null;
-        $class = 'form-control date';
+        $class = 'form-control date-time-selector-field';
 
         extract($params);
         if (! empty($all_empty)) {


=====================================
themes/base_files/scss/_tiki-miscellaneous_global.scss
=====================================
@@ -468,7 +468,8 @@ span.btn-link {
 }
 
 //date picker dropdowns
-select.form-control.date {
+// date class renamed to date-time-selector-field to avoid conflict with jQuery validation date class
+select.form-control.date-time-selector-field {
     width: auto;
     display: inline;
 }



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/ee601b0c45e3f28bd145fa71b5dba5dc0954b766

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/ee601b0c45e3f28bd145fa71b5dba5dc0954b766
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.