mirror of https://github.com/acid-info/lsd.git
feat: add individual styles for year month and day
This commit is contained in:
parent
1249d98ac0
commit
e37221761d
|
@ -54,16 +54,6 @@ export const DateFieldStyles = css`
|
|||
outline: none;
|
||||
}
|
||||
|
||||
.${dateFieldClasses.input}:focus::-webkit-datetime-edit {
|
||||
color: rgb(var(--lsd-text-primary));
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.${dateFieldClasses.error}
|
||||
.${dateFieldClasses.input}::-webkit-datetime-edit-fields-wrapper {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.${dateFieldClasses.supportingText} {
|
||||
position: absolute;
|
||||
}
|
||||
|
@ -125,4 +115,20 @@ export const DateFieldStyles = css`
|
|||
margin: 6px 12px 0 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.${dateFieldClasses.input}::-webkit-datetime-edit-month-field:focus,
|
||||
.${dateFieldClasses.input}::-webkit-datetime-edit-day-field:focus,
|
||||
.${dateFieldClasses.input}::-webkit-datetime-edit-year-field:focus {
|
||||
color: rgb(var(--lsd-text-primary));
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.${dateFieldClasses.error}
|
||||
.${dateFieldClasses.input}::-webkit-datetime-edit-year-field,
|
||||
.${dateFieldClasses.error}
|
||||
.${dateFieldClasses.input}::-webkit-datetime-edit-month-field,
|
||||
.${dateFieldClasses.error}
|
||||
.${dateFieldClasses.input}::-webkit-datetime-edit-day-field {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
`
|
||||
|
|
|
@ -93,6 +93,7 @@ export const DateField: React.FC<DateFieldProps> & {
|
|||
value={input.value}
|
||||
onChange={input.onChange}
|
||||
className={clsx(inputProps.className, dateFieldClasses.input)}
|
||||
max={inputProps.max || '9999-12-31'}
|
||||
/>
|
||||
{icon ? (
|
||||
<span
|
||||
|
|
Loading…
Reference in New Issue