diff --git a/frontend/src/components/PostOriginalCreatedTimeField.tsx b/frontend/src/components/PostOriginalCreatedTimeField.tsx
index ffabc6b..3709ae1 100644
--- a/frontend/src/components/PostOriginalCreatedTimeField.tsx
+++ b/frontend/src/components/PostOriginalCreatedTimeField.tsx
@@ -1,5 +1,6 @@
import DateTimeField from '@/components/common/DateTimeField'
import Label from '@/components/common/Label'
+import { Button } from '@/components/ui/button'
import type { FC } from 'react'
@@ -16,34 +17,52 @@ export default (({ originalCreatedFrom,
setOriginalCreatedBefore }: Props) => (
-
-
{
- const v = ev.target.value
- if (!(v))
- return
- const d = new Date (v)
- if (d.getSeconds () === 0)
- {
- if (d.getMinutes () === 0 && d.getHours () === 0)
- d.setDate (d.getDate () + 1)
- else
- d.setMinutes (d.getMinutes () + 1)
- }
- else
- d.setSeconds (d.getSeconds () + 1)
- setOriginalCreatedBefore (d.toISOString ())
- }}/>
- 以降
+
+
+ {
+ const v = ev.target.value
+ if (!(v))
+ return
+
+ const d = new Date (v)
+ if (d.getMinutes () === 0 && d.getHours () === 0)
+ d.setDate (d.getDate () + 1)
+ else
+ d.setMinutes (d.getMinutes () + 1)
+ setOriginalCreatedBefore (d.toISOString ())
+ }}/>
+ 以降
+
+
+
+
-
-
- より前
+
+
+
+ より前
+
+
+
+
)) satisfies FC
diff --git a/frontend/src/components/common/DateTimeField.tsx b/frontend/src/components/common/DateTimeField.tsx
index 5dbaae8..2481045 100644
--- a/frontend/src/components/common/DateTimeField.tsx
+++ b/frontend/src/components/common/DateTimeField.tsx
@@ -5,7 +5,7 @@ import { cn } from '@/lib/utils'
import type { FC, FocusEvent } from 'react'
-const pad = (n: number) => n.toString ().padStart (2, '0')
+const pad = (n: number): string => n.toString ().padStart (2, '0')
const toDateTimeLocalValue = (d: Date) => {
@@ -14,8 +14,7 @@ const toDateTimeLocalValue = (d: Date) => {
const day = pad (d.getDate ())
const h = pad (d.getHours ())
const min = pad (d.getMinutes ())
- const s = pad (d.getSeconds ())
- return `${ y }-${ m }-${ day }T${ h }:${ min }:${ s }`
+ return `${ y }-${ m }-${ day }T${ h }:${ min }:00`
}
@@ -37,7 +36,6 @@ export default (({ value, onChange, className, onBlur }: Props) => {
{
const v = ev.target.value