From a87b48df685ae010182c9efeb063e3481003a726 Mon Sep 17 00:00:00 2001 From: Viktor Miller Date: Sat, 17 Jan 2026 21:57:57 +0900 Subject: [PATCH] fix(07-01): auto-convert date slashes to dots after picker selection Added change event listener that automatically replaces forward slashes with dots in date fields after user makes a selection. This ensures consistent DD.MM.YYYY format throughout the form interaction. Co-Authored-By: Claude Sonnet 4.5 --- templates/provider-dashboard.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/templates/provider-dashboard.php b/templates/provider-dashboard.php index 10df84a..90395ca 100644 --- a/templates/provider-dashboard.php +++ b/templates/provider-dashboard.php @@ -138,6 +138,19 @@ if ( $is_edit_mode ) { } }); }, 500); + + // Fix date format after user selects a date - replace slashes with dots + $(document).on('change', 'input[type="date"], input.frm_date', function() { + var field = $(this); + var value = field.val(); + + // If the value contains slashes, replace them with dots + if (value && value.includes('/')) { + var fixedValue = value.replace(/\//g, '.'); + field.val(fixedValue); + console.log('Fixed date format from', value, 'to', fixedValue); + } + }); });