Compare commits
No commits in common. "7cc8cb81791687cc198d3899a30e12ab0b9fc0f3" and "48a9d760df4e1887da131bb33523cb6155cf8b05" have entirely different histories.
7cc8cb8179
...
48a9d760df
|
|
@ -337,7 +337,8 @@ 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();
|
||||
|
|
|
|||
|
|
@ -294,37 +294,6 @@
|
|||
$('#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();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue