fix: greeting date picker, addons sort dropdown

This commit is contained in:
David Ralph
2021-11-18 14:49:20 +00:00
parent 42f89b3fc3
commit 7c7994c63f
3 changed files with 9 additions and 3 deletions

View File

@@ -121,3 +121,9 @@ p.author {
max-width: 250px;
overflow-x: hidden;
}
@media (max-height: 1080px) {
.dropdownsortAddons {
margin-top: 40px !important;
}
}

View File

@@ -50,7 +50,7 @@ export default class Dropdown extends PureComponent {
const label = this.props.label || '';
return (
<FormControl fullWidth>
<FormControl fullWidth className={id}>
<InputLabel id={id}>{label}</InputLabel>
<Select labelId={id} id={this.props.name} value={this.state.value} label={label} onChange={this.onChange} ref={this.dropdown} key={id}>
{this.props.manual ? this.props.children : this.props.children.map((e, index) => {

View File

@@ -15,10 +15,10 @@ export default class GreetingSettings extends PureComponent {
}
changeDate = (e) => {
localStorage.setItem('birthday', e.target.value);
localStorage.setItem('birthday', e.target.value || new Date());
this.setState({
birthday: new Date(e.target.value)
birthday: e.target.value ? new Date(e.target.value) : new Date()
});
}