Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(lemon-ui): seed Quill DatePicker time toggle from includeTime state (#65910)

Paul D'Ambra73af9ff99601
diff --git a/frontend/src/lib/components/DatePicker/DatePicker.test.tsx b/frontend/src/lib/components/DatePicker/DatePicker.test.tsx
index adb83a61400a..d93bbe69341f 100644
--- a/frontend/src/lib/components/DatePicker/DatePicker.test.tsx
+++ b/frontend/src/lib/components/DatePicker/DatePicker.test.tsx
@@ -184,6 +184,7 @@ describe('DatePicker', () => {
expect(within(container).getByRole('button', { name: /January 15, 2023/ }).textContent).toBe(
'January 15, 2023 09:30'
)
+ expect(mockQuillPanelProps.showTime).toBe(true)
})
it('forwards maxDate to the Quill panel so future dates can be selected', async () => {
diff --git a/frontend/src/lib/components/DatePicker/DatePicker.tsx b/frontend/src/lib/components/DatePicker/DatePicker.tsx
index 661bee0551b3..70903c82f7f6 100644
--- a/frontend/src/lib/components/DatePicker/DatePicker.tsx
+++ b/frontend/src/lib/components/DatePicker/DatePicker.tsx
@@ -146,7 +146,7 @@ function DatePickerQuill({
<QuillDatePicker
value={value ? value.toDate() : new Date()}
maxDate={maxDate?.toDate()}
- showTime={granularity === 'minute'}
+ showTime={includeTime}
showTimeToggle={!!showTimeToggle}
onIncludeTimeChange={handleIncludeTimeChange}
onApply={applyDate}