Browse Source

feat(form): manual input & default value

pull/1/head
farhantock 7 months ago
parent
commit
159ed65e3f
  1. 18
      edit-mode/function/reportActivity.js

18
edit-mode/function/reportActivity.js

@ -62,22 +62,14 @@ $(document).ready(function () {
$('#ra_date_end_activity').prop('disabled', true);
}
});
// $('#ra_date_start_activity').datepicker({
// format: 'dd-mm-yyyy', // Set the desired format
// autoclose: true // Close the datepicker when a date is selected
// });
//
// $('#ra_date_end_activity').datepicker({
// format: 'dd-mm-yyyy', // Set the desired format
// autoclose: true // Close the datepicker when a date is selected
// });
$("#ra_date_end_activity").on("change", function () {
let valEnd = $(this).val()
let valStart = $('#ra_date_start_activity').val()
const compDate = moment(valEnd).isBefore(moment(valStart))
if (compDate) {
let valEnd = moment($(this).val());
if (moment(valEnd).format('YYYY') >= moment(valStart).format('YYYY')) {
if (moment(valEnd).isBefore(moment(valStart))) {
gantt.alert("End Activity Date cannot be lower than Start Activity Date");
$('#ra_date_end_activity').val()
}
}
});

Loading…
Cancel
Save