I have a React.js project. I want to use data-picker plugin which require this style of input-attributes:
<input data-enable-time=true />
But webpack doesn't compile the app, when true is without quotes. Plugin doesn't work, when true with quotes.
What I should do?
UPD.
Yes, I run picker in componentDidMount()
It works, but displaying only date, without time.
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(
<div className="dateInputContainer">
<input id="fPicker" className="flatpickr" data-enable-time="true" />
</div>
)
}
}
But data-enable-time="true"
doesn't work.