Commit e33e79c
committed
fix: handle invalid dates in EditEmployeeDialog to prevent crashes
- Added formatDateForInput helper function to safely format dates
- Returns empty string for invalid dates instead of calling toISOString on invalid Date objects
- Fixes RangeError: Invalid time value crash when editing employees with malformed date data
- Resolves console error: "The specified value '+022222-12-21' does not conform to the required format, 'yyyy-MM-dd'"1 parent e146747 commit e33e79c
1 file changed
+22
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
11 | 27 | | |
12 | 28 | | |
13 | 29 | | |
| |||
187 | 203 | | |
188 | 204 | | |
189 | 205 | | |
190 | | - | |
| 206 | + | |
191 | 207 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| 208 | + | |
197 | 209 | | |
198 | 210 | | |
199 | 211 | | |
| |||
237 | 249 | | |
238 | 250 | | |
239 | 251 | | |
240 | | - | |
| 252 | + | |
241 | 253 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 254 | + | |
247 | 255 | | |
248 | 256 | | |
249 | 257 | | |
| |||
257 | 265 | | |
258 | 266 | | |
259 | 267 | | |
260 | | - | |
| 268 | + | |
261 | 269 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
| 270 | + | |
267 | 271 | | |
268 | 272 | | |
269 | 273 | | |
| |||
0 commit comments