gpbl on gh-pages
Deploy website - based on 71655… (compare)
gpbl on master
fix(docs): fix typo (#1457) (compare)
Hi, I think the documentation is not updated especially the example section. examples/input-date-fns.js in particular.
below lines are throwing error for packages while importing.
import dateFnsFormat from 'date-fns/format';
import dateFnsParse from 'date-fns/parse';
I fixed them by importing them in below manner.
import {format} from 'date-fns;
import {parse} from 'date-fns';
Hello. Can anyone review the PR? @gpbl
todayButton
provided with the library and create my own custom footer that displays the filter buttons: Go to Today, Past Year, Last 3 Months, This Month, and This Week. Looking for insight on how and if it's possible to tap into the libraries API outside of the context of the component.
Hi Everyone I'm newer to react so this question should be both easy and embarrassing. I can't figure out how to get the state from the react-day-picker into a parent component.
This is what I wrote to try, but it's not working. Likely it's a lack of familiarity with the tools.
class datePicker extends Component {
constructor(props){
super(props)
this.handleDayChange = this.handleDayChange.bind(this)
this.state = {
selectedDay: '',
}
}
handleDayChange(day, { selected }) {
this.setState({ selectedDay: day });
}
componentDidUpdate(prevProps){
if(this.prevProps.selectedDay !== this.state.selectedDay){
this.props.handleDate(this.state);
}
}
render() {
return (
<DayPickerInput onDayChange={this.handleDayChange} />
)
}
}
componentDidUpdate
was use it to see that the this.state.selectedDay
changed when compared to the default state I set in the parent component which was also set to selectedDay = ''
and so I tried to do a comparison check via that lifecycle component between this.state.selectedDay
and this.props.selectedDay
Hello, my name is Liora and I am currently hunting open source projects for company NeuraLegion (www.neuralegion.com)
We just launched a free annual subscription for open source projects for our AIAST tool NexPloit.
If you are interested, please, reach us on opensource@neuralegion.com!
Thank you for your time and consideration! If you have any questions, please do not hesitate to contact us!
Best!
<DayPicker />
when a user presses the "down" or "up" arrow key on their keyboard while focused on the calendar? I have some users who use the keyboard to scroll up/down on the page and they're really confused by this feature. Thanks in advance for any help!
canChangeMonth={false}
in the props... I think that will stop the arrow keys for the year change... although it will probably affect the changing of the month too - I've never tried that prop. If you didn't do that you'd have to get in and stop the key events from propagating up to the layer just below the container... You could potentially stop that using the renderMonths
renderNav
methods but it doesn't sound easy
firstDayOfWeek={1}
isn't working that sounds like a bug. For selecting multiple weeks, following the example should work fine except you'd need to set a separate range based on your date. I expect you'd just need to tinker with the getWeekRange method in that example to do what you want