Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i get the name of the cell selected DefinedRange #228

Open
in-ten-to opened this issue Aug 2, 2018 · 3 comments
Open

How can i get the name of the cell selected DefinedRange #228

in-ten-to opened this issue Aug 2, 2018 · 3 comments
Labels

Comments

@in-ten-to
Copy link

in-ten-to commented Aug 2, 2018

Hello,

Can i get the name of the cell that i just clicked on?

handleChange(dates){
		this.setState({
			startDate: moment(dates.selection.startDate),
			endDate: moment(dates.selection.endDate)
	}, function () {
			this.refs.overlay.hide();
		}, this);
	}
render() {
		const selectionRange = {
			startDate: moment(this.state.startDate),
			endDate: moment(this.state.endDate),
			key: 'selection',
		};
		const popoverClickRootClose = (
			<Popover id="dateRange" className="popover bottom">
				<DefinedRange
					ranges={[selectionRange]}
					onChange={this.handleChange}
					locale={fr}
				/>
			</Popover>
		);

For now, i handle the change , but i don't know on which cell i clicked, i only know the Start and End Date.
Is there a way to get the name or the number of the cell selected? (Today, Yesterday, this week, last week , etc..) ?

Thanks in advance :D

@mkg0 mkg0 added the feature label Sep 15, 2018
@vijay40
Copy link

vijay40 commented Dec 30, 2020

Hello,

Can i get the name of the cell that i just clicked on?

handleChange(dates){
		this.setState({
			startDate: moment(dates.selection.startDate),
			endDate: moment(dates.selection.endDate)
	}, function () {
			this.refs.overlay.hide();
		}, this);
	}
render() {
		const selectionRange = {
			startDate: moment(this.state.startDate),
			endDate: moment(this.state.endDate),
			key: 'selection',
		};
		const popoverClickRootClose = (
			<Popover id="dateRange" className="popover bottom">
				<DefinedRange
					ranges={[selectionRange]}
					onChange={this.handleChange}
					locale={fr}
				/>
			</Popover>
		);

For now, i handle the change , but i don't know on which cell i clicked, i only know the Start and End Date.
Is there a way to get the name or the number of the cell selected? (Today, Yesterday, this week, last week , etc..) ?

Thanks in advance :D

Are you able to figure that out ? I am also struggling with the same issue..

@atefBB
Copy link
Contributor

atefBB commented Nov 3, 2021

@vijay40 @in-ten-to any updates about this issue !? I'm struggling too ! Thx

@atefBB
Copy link
Contributor

atefBB commented Nov 4, 2021

I solve this issue by forking this package and add the feature I want
atefBB@840f63e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants