react-date-range
react-date-range copied to clipboard
Set no predefined value in calendar
Is there any chance to define no default value when displaying calendar? I want to use this plugin only for selecting ranges, but I want to display only blank calendars by default after first render.
Did you ever find a solution ?
EDIT: I found this in the source code:
import moment from 'moment';
export default function parseInput(input, format) {
let output = null;
if (typeof input === 'undefined' || typeof input === 'null' || !input || input === '') {
output = moment().startOf('day');
} else if (typeof input === 'string') {
output = moment(input, format).startOf('day');
} else if (typeof input === 'function') {
output = parseInput( input(moment().startOf('day')) , format);
} else if (input._isAMomentObject) {
output = input.startOf('day').clone();
}
return output;
}
It seems that it will always return a moment object.
Exactly. I think that currently there is no solution for this problem
@martinpesout
Hopefully they'll make this possible, or maybe I'll make a pull request.
If a calendar state without a date selected is valid should you be able to unselect the date as well, or is that something you'd implement yourself?
Hello,
is there any update on this issue?
Regards
Hello,
I have the same need. Is there any update on this?
Regards