Using boolean-value of attributes in JSX
<p>I have a React.js project. I want to use data-picker plugin which require this style of input-attributes:</p>
<pre><code>&lt;input data-enable-time=true /&gt;
</code></pre>
<p>But webpack doesn't compile the app, when true is without quotes. Plugin doesn't work, when true with quotes.
What I should do?</p>
<p>UPD.</p>
<p>Yes, I run picker in componentDidMount()
It works, but displaying only date, without time.</p>
<pre><code>import React, {Component} from 'react'
const Flatpickr = require('flatpickr');

export default class Date extends Component {

  componentDidMount() {
    let dateInput = document.getElementById('fPicker');
    //init picker
    new Flatpickr(dateInput);

  }

  render() {
    return(
      &lt;div className=&quot;dateInputContainer&quot;&gt;
        &lt;input id=&quot;fPicker&quot; className=&quot;flatpickr&quot; data-enable-time=&quot;true&quot; /&gt;
     &lt;/div&gt;
    )
  }
}
</code></pre>
<p>But <code>data-enable-time=&quot;true&quot;</code> doesn't work.</p>