My datepicker isn't appearing under https://.../barrels/edit/(selectedID) unless I refresh the page first.
Should I be trying to move the datepicker initiation from on document ready to component will mount or possibly into the axious request?
var elem = document.querySelector('.datepicker');
var instance = M.Datepicker.init(elem, options);
componentWillMount(){
this.getBarrelDetails();
$('.datepicker').pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears: 15, // Creates a dropdown of 15 years to control year,
today: 'Today',
clear: 'Clear',
close: 'Ok',
closeOnSelect: false // Close upon selecting a date,
});
}
My datepicker isn't appearing under https://.../barrels/edit/(selectedID) unless I refresh the page first.
Should I be trying to move the datepicker initiation from on document ready to component will mount or possibly into the axious request?
..client_src/src/components/BarrelEdit.js
https://food-liberation-front.herokuapp.com