Topic: Time picker doesnt open inline
Krzysztof Wilk staff answered 4 years ago
Hi!
You didn't paste your code. I assume that this code will help you.
import React, { Component } from "react";
import { MDBTimePicker, MDBCol, MDBBtn } from "mdbreact";
class TimePickerPage extends Component {
componentDidMount() {
const pickerInput = document.getElementById('timePicker');
const pickerLabel = document.querySelector('label[for="timePicker"]');
pickerLabel.style.transform = 'translateY(-20px) scale(0.8)';
pickerInput.parentNode.style.display = 'inline';
}
render() {
return (
<MDBCol className='mt-5' md="6">
<MDBBtn style={{ display: 'inline' }}>Test</MDBBtn><MDBTimePicker id="timePicker" label="12hrs format" />
</MDBCol>
);
}
}
export default TimePickerPage;
If not - please, describe precisely your problem or goal you want to achieve and attach your code/images to your topic :)
Best regards
Elaheh commented 3 years ago
hi , your code in dont working myproject i need inline timepicker in myproject please help me.
Krzysztof Wilk staff commented 3 years ago
Hi!
If you meant an example like this one https://mdbootstrap.com/docs/b5/react/forms/timepicker/#section-inline-12 - I'm afraid there's no inline version of the MDBTimePicker component in the MDB4 package.
Keep coding!
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB React
- MDB Version: 5.0.1
- Device: web
- Browser: chrome
- OS: window 10
- Provided sample code: No
- Provided link: No
Krzysztof Wilk staff commented 4 years ago
Hi!
Do you have the pro package? If yes - could you share your app code (or at least fragment with the picker)? It'll be very helpful to find the solution :)
Best regards
Elaheh commented 4 years ago
hi , We bought it from you . Help if possible .I am using the following code