Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.
This repository was archived by the owner on May 19, 2025. It is now read-only.

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

Description

@in-ten-to

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

Activity

  1. vijay40 commented on Dec 30, 2020

    @vijay40

    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..

  2. atefBB commented on Nov 3, 2021

    @atefBB
    Contributor

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

  3. atefBB commented on Nov 4, 2021

    @atefBB
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions