horilla icon indicating copy to clipboard operation
horilla copied to clipboard

Employee Edit view cannot show currently stored dates

Open federoitman opened this issue 10 months ago • 4 comments

Bug Report

Description

When I add ingress date to an employee, after successful save, the form shows the data as empty. If I go to the employee profile the date has been correctly set.

Steps to Reproduce

  1. Edit an employee 2.a. If the employee has already an ingress date, go to 3 2.b. If the employee has no ingress date, choose one and save
  2. The edit form has no ingress date set.

Expected Behavior

I should be able to see the set date in the edit form

Actual Behavior

The date is show as not set "dd/mm/yyyy" In the browser console I see: "The specified value "01/01/2025" does not conform to the required format, "yyyy-MM-dd"."

Environment

Latest dev branch running in docker-compose.

federoitman avatar Jan 24 '25 13:01 federoitman

Hi @federoitman ,

We appreciate the detailed description and steps to reproduce the problem. The issue occurs because the date format currently supports only displaying values, but not for input fields. Specifically, the input fields expect the yyyy-MM-dd format, which is causing the mismatch with the displayed format dd/mm/yyyy.

We will work on updating the system to ensure the selected date format is consistently applied in the input field as well. This will prevent the error:

This enhancement will align the displayed date format with the input field's requirements, providing a seamless experience when editing employee details.

We’ll keep you updated as this fix progresses. In the meantime, if you have any additional feedback or suggestions, feel free to let us know!

Best Regards, Team Horilla

horilla-opensource avatar Jan 27 '25 09:01 horilla-opensource

Thanks for your response. I'm trying to update the date-time format to "yyyy-mm-dd" in the meantime.

But if I go to /settings/date-settings/ date appears ad yyyy-mm-dd

Image

If I try to update the format for All company I receive the error: "Please update the company field for the user."

If I try to do it for a single company I recieve the error: "Date format cannot saved. You are not in the company."

federoitman avatar Jan 27 '25 12:01 federoitman

Any update on this or workaround?

federoitman avatar Mar 05 '25 15:03 federoitman

Hi @federoitman ,

While the current date input field behavior needs some major updates, we’re actively working on converting the views to Class-Based Views (CBVs). This update will also include improvements to the date field format.

For now, we’re still looking for contributions from the community, especially regarding the input date format change. If you're comfortable with it, any help would be greatly appreciated to speed up the process.

Best Regards, Team Horilla

horilla-opensource avatar Apr 28 '25 05:04 horilla-opensource