question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Clicking on days from a neighboring month doesn't render that month?

See original GitHub issue

Hello, first of all, thank you for this library. I’m using it to create a small app like a schedule or agenda with learning purposes. I’ve noticed that in your online demo when you click a day that belongs to another month (previous or next) it will take you to that month. However I can’t achieve this. I’ve looked at your sample and it’s code and I’ve done the same but for some reason it doesn’t work. The day gets selected but I have to manually change to the month from the navigation component. I’ve checked the list of props and I didn’t find one that changes that. Am I missing something here? Here’s my code so far:

import React from 'react';
import Calendar from 'react-calendar/dist/entry.nostyle';
import 'styles/calendarStyle.css';

export default class HomePage extends React.Component {
  state = {
    value: new Date(),
  }

  onChange = (value) => {
    this.setState({ value });
  }

  render() {
    const { value } = this.state;
    return (
      <div>
        <Calendar
          locale="es"
          onChange={this.onChange}
          value={value}
        />
      </div>
    );
  }
}

Thank you for this library and for your time!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
prina92commented, Jan 26, 2018

Oh I see I still don’t quite understand why is it working on the online demo though. If it weren’t for that I wouldn’t even asked. Thank you for the quick reply!

0reactions
wojtekmajcommented, Nov 8, 2018

And which version are you using? How is the calendar implemented? It works in the current test suite.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Separation Anxiety (for Parents) - Nemours KidsHealth
Teary and tantrum-filled goodbyes are common with separation anxiety, which is a perfectly normal part of childhood development.
Read more >
View your day, week, or month - Google Calendar Help
In the top left, tap the month name. For example, January Down Arrow . Swipe left or right to go to other months....
Read more >
ask the crystal ball
Using the crystal ball is very simple: All you have to do is write your question and click on the validation button. And...
Read more >
RMA doesn't work. Warranty doesn't work. Microphone ...
Hi,At almost having the OPO for 1 month and no problem, in the 10 September the Microphone stops working. The people on the...
Read more >
SuperCity - We have new guests in SuperCity Meet Chef, who is ...
2 superbucks every 5 days from Astrologer's House = 12 superbucks a month, ... for neighbors, click on "most relevant , then "new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found