mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5313] [Bug]: Missing clear/remove button (X) on expiry date picker when using Jalali calendar #3721
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3721
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gholamshahivision-ops on GitHub (Jun 14, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5313
Describe the bug
When the panel's date and time setting is switched to Jalalian, the date picker modal used for a client's Expiry Date does not display a clear/remove button (
x).Once an expiry date is selected and saved for a client, it is impossible to remove or clear it while using the Jalali calendar framework. Switching the panel settings back to Gregorian restores the standard date picker, which correctly displays the clear button (
x) allowing the date to be removed.How to reproduce the problem
Steps to reproduce
x) or clear button in the date field to wipe it out.Expected behavior
The Jalalian date picker should match the functionality of the Gregorian picker. It should feature a clear/reset icon (
x) inside the input field (or anallowClearproperty enabled on the component) so administrators can instantly remove an expiration date without switching global panel settings.Actual behavior
When using the Jalalian calendar setting, the date picker input field becomes completely locked once a date is selected. There is no clear icon or reset button (
x) inside the field. The only way to wipe the expiry date clean is to globally switch the entire panel back to the Gregorian calendar system.Relevant logs
Screenshots
3x-ui version
3.3.1
Xray-core version
No response
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 22
Which parts of the panel are affected?
Frontend (UI / panel pages)
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
Yes — Cloudflare (proxied DNS)
Before submitting
@github-actions[bot] commented on GitHub (Jun 14, 2026):
This is a confirmed bug in
frontend/src/components/form/DateTimePicker.tsx.The component has two rendering paths depending on the panel's calendar setting:
<DatePicker>, which ships withallowClearenabled by default. That produces the clear (×) icon in the input field.<PersianDateTimePicker>from thepersian-calendar-suite@^1.5.5package (lines 64–84). The local type declaration infrontend/src/env.d.ts(lines 61–82) does not include anallowClearor equivalent prop, and the component is instantiated without one. TheonChangehandler is already written to handlenullcorrectly (lines 70–71), so the callback side is fine — the only problem is that the library component renders no UI affordance to trigger it.The result is exactly as described: once a date is saved under the Jalalian setting, there is no way to clear it from the picker UI without switching back to Gregorian.
Affected files and lines:
frontend/src/components/form/DateTimePicker.tsx, lines 64–84 (Jalalian branch)frontend/src/env.d.ts, lines 61–82 (PersianDateTimePickerPropstype declaration)The
DateTimePickercomponent is used for the client expiry date inClientFormModal.tsx(line 523) andClientBulkAddModal.tsx(line 338), and for the inbound expiry date inInboundFormModal.tsx(line 652), so all three locations are affected.A fix would involve one of:
PersianDateTimePickerif the upstream library exposes one (the type declaration inenv.d.tswould also need updating).PersianDateTimePickerwith an explicit clear button inside thejdp-wrapcontainer that callsonChange(null).No version-specific information, logs, or additional steps are needed; the issue is fully reproducible from the source.
This reply was generated automatically; a maintainer may follow up.
@MHSanaei commented on GitHub (Jun 15, 2026):
Fixed on
maininf00512d1. The Jalali (Jalalian) expiry date picker now has a working clear (×) button, and the empty field no longer shows leftover Persian placeholder text. Ships in the next release.