mirror of https://github.com/usememos/memos.git
When editing a memo, use input type datetime-local instead of text to allow the use of calendar to change date. Potentially this would allow to get ride of format check
This commit is contained in:
parent
b19e736f10
commit
8d4553faf9
|
|
@ -18,7 +18,7 @@ interface Props {
|
||||||
const DateTimeInput: React.FC<Props> = ({ value, onChange }) => {
|
const DateTimeInput: React.FC<Props> = ({ value, onChange }) => {
|
||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="datetime-local"
|
||||||
className={cn("px-1 bg-transparent rounded text-xs transition-all", "border-transparent outline-none focus:border-border", "border")}
|
className={cn("px-1 bg-transparent rounded text-xs transition-all", "border-transparent outline-none focus:border-border", "border")}
|
||||||
defaultValue={formatDate(value)}
|
defaultValue={formatDate(value)}
|
||||||
onBlur={(e) => {
|
onBlur={(e) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue