Time picker doesnt open inline


Topic: Time picker doesnt open inline

Elaheh asked 2 weeks ago

hello i need to using time picker inline

please help me


Krzysztof Wilk staff commented 2 weeks 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 2 weeks ago

hi , We bought it from you . Help if possible .I am using the following code


Krzysztof Wilk staff answered 2 weeks 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


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: React
  • MDB Version: 5.0.1
  • Device: web
  • Browser: chrome
  • OS: window 10
  • Provided sample code: No
  • Provided link: No
Tags