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); + } + }); });