Skip to content

Commit

Permalink
vast
Browse files Browse the repository at this point in the history
we geraken niet aan de state
  • Loading branch information
FelixDePrins committed Apr 26, 2024
1 parent 5aff18a commit 6f99617
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
14 changes: 12 additions & 2 deletions ui/src/components/TimePicker/TimePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@ import { t } from 'i18next';

class TimePicker extends React.PureComponent {
maxDate = new Date( new Date())
constructor(props){
super(props)
this.state = {
date: new Date()
}
}
handleChange = (date) => {
this.setState({ date });
};
render() {
return <DateTimePickerComponent placeholder ={t('timepicker.placeholder')}
id="datetimepicker"
strictMode={true}
strictMode="true"
max={this.maxDate}
onChange={(date) =>console.log(date)}
onChange={this.handleChange}
value={this.state.date}
/>;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/TimePicker/TimePicker.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* To specify background color and font size */
.e-datetime-wrapper .e-input-group-icon.e-date-icon, .e-datetime-wrapper .e-input-group-icon.e-time-icon {
font-size: 16px;
background-color: rgb(202, 17, 17);
background-color: transparent;
}
10 changes: 7 additions & 3 deletions ui/src/pages/Media/Media.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Media extends React.Component {
currentRecording: '',
});
}

trackScrolling = () => {
const { events, dispatchGetEvents } = this.props;
const { isScrolling } = this.state;
Expand Down Expand Up @@ -80,7 +80,9 @@ class Media extends React.Component {
isBottom(el) {
return el.getBoundingClientRect().bottom + 50 <= window.innerHeight;
}

handleChange(){

}
openModal(file) {
this.setState({
open: true,
Expand Down Expand Up @@ -108,7 +110,9 @@ class Media extends React.Component {
</Breadcrumb>
<ControlBar type="row">
<Tabs>
<TimePicker />
<TimePicker>
onClick ={()=>console.log(this.state.date)};
</TimePicker>
<Tab
label={t('settings.submenu.all')}
value="all"
Expand Down

0 comments on commit 6f99617

Please sign in to comment.