Skip to content

Improved datetime selector - #351

Open
NiCADitO wants to merge 2 commits into
inductiveautomation:mainfrom
NiCADitO:improved-datetime-selector
Open

Improved datetime selector#351
NiCADitO wants to merge 2 commits into
inductiveautomation:mainfrom
NiCADitO:improved-datetime-selector

Conversation

@NiCADitO

@NiCADitO NiCADitO commented Aug 13, 2026

Copy link
Copy Markdown

The time filter's start and end fields pair a JXDatePicker with three spinners for
hour, minute, and second, so setting a bound means clicking through a cluster of small
arrow buttons, and the field still never shows the milliseconds that log events carry.
This replaces that stack with a single reusable DateTimeSelector in utils/: one
field showing the full timestamp, plus a popup where a scrollable list of times does
most of what the spinner buttons used to, alongside a calendar and a few jump and nudge
buttons. Days containing events are flagged in the calendar, Start and End can no longer
cross, and the field parses the uuuu-MM-dd HH:mm:ss:SSS format used elsewhere in
Kindling, so a timestamp copied from the log table pastes straight in.

Changes

  • Added utils/DateTimeSelector.kt.
  • Removed DateTimeSelector, TimeSelector, TimePartSpinner, ChronoSpinnerModel and
    ZonedDateTime.toDate() from TimePanel.kt.
  • setModelData now refreshes the flagged days, so the calendar follows the file filter.
  • Fixed Date Picker Evaluation of Timestamps #341's timezone fix still holds: the selector reads Timezone.Default.zoneId at each
    use rather than caching it, and re-renders when the preference changes.

Testing

  • ./gradlew build on JDK 21.
  • Wrapper and system logs, timezone changes, file filter changes, theme changes.

Note
Picking from the time list zeroes seconds and milliseconds, since it steps in five minute
increments. Typing and scrolling keep full precision. Happy to change that if you would
rather the list preserve them.

image

- Refresh the calendar's flagged days in setModelData so they follow the file filter
- Remove the unused defaultValue property and reset() from DateTimeSelector
- Guard the crossing push so a single edit runs one filter pass instead of two
- Reorder the minute nudge buttons so the positive row mirrors the negative row
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant