Compare commits

...

2 Commits

Author SHA1 Message Date
zeeshan 7cc8cb8179 Zenova Domain (Tracker form )- Date limit
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m43s Details
2026-10-07 12:53:11 +05:30
zeeshan deca6819fe Lifemankind (Ventidox )- Date issue fix 2026-10-07 12:52:18 +05:30
2 changed files with 32 additions and 2 deletions

View File

@ -337,8 +337,7 @@ if (!empty($submissions->data->submissions)) {
});
});
$('label[for="field-record_date"]').html('Date <span class="text-danger">*</span><br><small class="text-danger">Future date is not allowed.</small>');
$(document).ready(function() {
var today = new Date();

View File

@ -294,6 +294,37 @@
$('#field-contact_id').trigger('change');
});
$(document).ready(function() {
var today = new Date();
var maxDate = today.toLocaleDateString('en-CA'); // YYYY-MM-DD
var minDate = '2026-10-01';
var $recordDate = $('#field-record_date');
$recordDate.attr({
min: minDate,
max: maxDate
});
// Date validation function
function validateFutureDate() {
var selectedDate = $recordDate.val();
if (selectedDate && selectedDate > maxDate) {
alert('Future date is not allowed. Please select today or a past date.');
$recordDate.val(''); // Clear the input field
return false;
}
return true;
}
// Android वर instant trigger होण्यासाठी input, change, आणि blur
$recordDate.on('input change blur', function() {
validateFutureDate();
});
});