Function in Code.gs file
function formatDate(date) {
var formattedDate = Utilities.formatDate(date, 'GMT+3', 'dd.MM.yyyy');
return formattedDate;
}
index.html file,
Data coming from the table to the modal form for editing in the table
editButtons.forEach(function(button) {
button.addEventListener('click', function() {
const id = button.getAttribute('data-id');
currentEditId = id;
google.script.run.withSuccessHandler(function(employee) {
document.getElementById('ise-giris-tarihi').value = employee.iseGirisTarihi;
const employeeModal = new bootstrap.Modal(document.getElementById('employee-modal'));
employeeModal.show();
}).getEmployeeById(id);
});
});
There is an edit data button on the index page. When I click on the edit button, I want the date format to appear as dd.mm.yyyy. How can I adjust the date format? For example, it says 30.06.2024 in the e-table, but the data does not come to the modal form.