profile
viewpoint
Wojciech Maj wojtekmaj Kraków, Poland http://wojtekmaj.pl Hi! I'm a React developer from Krakow, Poland. I work for Intive and I'm the maintainer of React-PDF, React-Calendar and many other successful packages.

wojtekmaj/react-calendar 1284

Ultimate calendar for your React app.

wojtekmaj/react-date-picker 574

A date picker for your React app.

wojtekmaj/react-daterange-picker 181

A date range picker for your React app.

nnarhinen/react-pdf 172

React component for showing pdf documents

wojtekmaj/react-clock 98

An analog clock for your React app.

wojtekmaj/get-user-locale 19

A function that returns user's locale as an IETF language tag, based on all available sources.

wojtekmaj/make-cancellable-promise 7

Make any Promise cancellable.

wojtekmaj/merge-class-names 5

A function that merges given class names, no matter their format: string with single or multiple class names or an array of class names. Filters out invalid class names as well.

wojtekmaj/date-utils 4

A collection of date-related utilities.

wojtekmaj/make-event-props 4

Returns an object with on-event callback props curried with provided args.

issue openedwojtekmaj/react-calendar

Pass a ref to the calendar component

hi @wojtekmaj sorry if it's not correct to reopen this close issue, but I think that would be great if I could pass a ref to the calendar component, so I can use for instance https://usehooks.com/useOnClickOutside/

and handle the click outside the component, I think that this would not require so many changes and would be a solution for those who need to collapse the calendar when clicking outside

Originally posted by @cocodrino in https://github.com/wojtekmaj/react-calendar/issues/338#issuecomment-635616386

created time in 7 hours

issue closedwojtekmaj/react-calendar

Text strings must be rendered within a <Text> component

Hello, I pretty much created a new react-native app and tried using react-calendar, and get this error.

Error: Text strings must be rendered within a <Text> component. This error is located at: in button (created by Navigation) in div(created by Navigation) in Navigation (created by Calendar)

Screen Shot 2020-05-30 at 8 47 01 PM My dependencies are as such:

{
  "name": "ppreact",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "react": "^16.13.1",
    "react-calendar": "^3.1.0",
    "react-dom": "^16.13.1",
    "react-native": "0.62.2",
    "react-native-safe-area-context": "^2.0.3"
  },
  "devDependencies": {
    "@babel/core": "7.10.0",
    "@babel/runtime": "7.10.0",
    "@react-native-community/eslint-config": "0.0.5",
    "babel-jest": "24.9.0",
    "eslint": "^6.8.0",
    "jest": "24.9.0",
    "metro-react-native-babel-preset": "0.58.0",
    "react-test-renderer": "16.11.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

Seems like a common issue past react-native ~0.54. Any recommendations?

closed time in 7 hours

itskaizad

issue commentwojtekmaj/react-calendar

Text strings must be rendered within a <Text> component

That's calendar for React, not React Native. Unfortunately you can't really build a component that renders in both.

itskaizad

comment created time in 7 hours

issue commentwojtekmaj/react-calendar

Show only the days of the week Monday to Saturday

Just for reference for anyone coming to this thread now. It's been 2 years since this question was asked :)

Proper solution today would be to build tileClassName function that checks if a day is Sunday, and if so, returns a class name, e.g. "hidden".

henriqueweiand

comment created time in 7 hours

issue commentwojtekmaj/react-calendar

CSS classes for 7 days in a row?

Try and build a function that compares dates and checks if the difference between them is less than 7 :)

fosteman

comment created time in 7 hours

create barnchwojtekmaj/react-lifecycle-methods-diagram

branch : webpack

created branch time in 12 hours

push eventwojtekmaj/react-lifecycle-methods-diagram

Wojciech Maj

commit sha ea31df1d1b279c2a1c049a9c396a2c53ec9af16b

Default to 'en-US' locale and '16.4' version in options, 'en-US' locale in html lang if invalid options were selected Default to 'en-US' in html lang & language dropdown if invalid locale was selected Fixup 2815790

view details

Wojciech Maj

commit sha 144e70ccc62caaa9135005dedae00744e58aadba

Display planet emoji for zh-* locales

view details

Wojciech Maj

commit sha 1fd784d0891f9bc854dfe3142f4b7c4d1a923f4b

Remove zh-TW, replace zh-CN with neutral zh-Hans locale

view details

Wojciech Maj

commit sha e4c83f370ef0a0eed94aaf8f7efdfd22a7e343af

Fix Open Graph meta properties having http protocol

view details

push time in 12 hours

push eventwojtekmaj/react-lifecycle-methods-diagram

Wojciech Maj

commit sha 03d1544c4896e4e18bdc3114f692033fead204c9

Fix Open Graph meta properties having http protocol

view details

push time in 12 hours

issue closedwojtekmaj/react-lifecycle-methods-diagram

"Chinese(Taiwan)" is incorrect! ⚠️

image

"Chinese(Taiwan)" is is incorrect. "Chinese(Traditional)" is right! Chinese language, only the difference between simplified Chinese and traditional Chinese, there is no difference between regions.

You should avoid possible political problems.

@wojtekmaj

closed time in 14 hours

iTonyYo

issue commentwojtekmaj/react-lifecycle-methods-diagram

"Chinese(Taiwan)" is incorrect! ⚠️

Fixed in 7dab3c4.

iTonyYo

comment created time in 14 hours

push eventwojtekmaj/react-lifecycle-methods-diagram

Wojciech Maj

commit sha 28157907a08afce193e46e01694e5f230002e34e

Default to 'en-US' in html lang & language dropdown if invalid locale was selected

view details

Wojciech Maj

commit sha fc6d3b33837436c556c223cde3e46cd12edd5c19

Display planet emoji for zh-* locales

view details

Wojciech Maj

commit sha 7dab3c4403faa79dd40ff0d9c01036bd784ddb62

Remove zh-TW, replace zh-CN with neutral zh-Hans locale

view details

push time in 14 hours

issue commentwojtekmaj/react-lifecycle-methods-diagram

"Chinese(Taiwan)" is incorrect! ⚠️

Agreed - we gotta be consistent. I've decided to rename zh-CN to zh-Hans.

iTonyYo

comment created time in 14 hours

issue commentwojtekmaj/react-lifecycle-methods-diagram

"Chinese(Taiwan)" is incorrect! ⚠️

Chinese traditional is zh-hant, not zh-tw 🤔

iTonyYo

comment created time in 2 days

delete branch wojtekmaj/react-calendar

delete branch : value-in-callbacks

delete time in 5 days

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha e226402678123e1006242d5f4268077d83af7da3

Add value to onActiveStartDateChange and onViewChange callbacks arguments (#379)

view details

push time in 5 days

PR merged wojtekmaj/react-calendar

Add value to onActiveStartDateChange and onViewChange callbacks arguments

This will make it much easier to programatically determine why a given callback was called.

For example, if value in onActiveStartDateChange remains the same, we know that it's not the calendar tile being clicked. We can use this information to eg. stop calendar view from being updated if a tile is clicked (as user requested in, for example, #378).

+15 -2

2 comments

3 changed files

wojtekmaj

pr closed time in 5 days

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha 8d62d77389681aa6b388b87e730ef018cafc03f9

Fix too complex propTypes for prevLabel, nextLabel

view details

push time in 5 days

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha fd954187504ddab241d222fbd1e345bca3f3f7ba

Remove code duplication (#277)

view details

Wojciech Maj

commit sha 2c740d7a9b8dcee5bf0d598e0b4f41d973935a4a

v3.0.0-beta.2

view details

Wojciech Maj

commit sha bb16ce82033224a8a487140bb3a52b5e8f3e6f7b

Fix link to 2.x docs Closes #279

view details

Wojciech Maj

commit sha a03b283309d80ffc633a249838a8fd7df8ee5ee1

Refactor unit tests

view details

Wojciech Maj

commit sha 80ace80863d39d61d6aa52d43b87189c3b451508

Add unit tests

view details

Wojciech Maj

commit sha 0922d373d87796cf56e45c3073287b3d90b5e16b

Fix defaultValue, defaultActiveStartDate and defaultView ignored when calculating initial active start date

view details

Wojciech Maj

commit sha 31a0e56be0bea3190480490a8feba7a5dad5cc53

Add unit tests for derived calendarType value

view details

Wojciech Maj

commit sha b85cdcfc9deb97081029f2bfcb6bac6e54596042

Add cross-env for multi-platform builds

view details

Wojciech Maj

commit sha 8821badb977236aa7fb77facf8fa75180cef086b

v3.0.0-beta.3

view details

Wojciech Maj

commit sha e8e910f87e2b007f8c429a3cd36b1c83e4dc96d7

Simplify logic of drillUp/drillDown (#285) * Simplify logic of drillUp/drillDown * Use callback instead of cb variable name

view details

Wojciech Maj

commit sha 30508269edc0e9987c6f2eba891b8897aadb2ae4

Extract variable instead of calling this.valueType twice (#286)

view details

Wojciech Maj

commit sha 2356af7da3934909bfd37f4fedda4482146fa617

Don't repeat the same arguments list twice (#287)

view details

Wojciech Maj

commit sha d3433427a6b4aaf67f71c86127ff26c4fed3e8b0

Remove mergeFunctions util (#284)

view details

Wojciech Maj

commit sha fb6e758e15f0fa07c8183f219f67fbb661af6b58

[breaking] Remove backwards compatibility with renderChildren (#283)

view details

Wojciech Maj

commit sha 849a09cc68a3c792ca580174e9487d47964449cb

Simplify get value logic (#288) * Add getValuePiece helper to avoid code repetition * Add getDetailValue helper to avoid code repetition * Simplify argument list * Fix error * Fix ESLint issues

view details

Wojciech Maj

commit sha ba5a1cc4db0b63a087fc5981d61aaac955f8199a

Don't call getLimitedViews when we already have the result (#289)

view details

Wojciech Maj

commit sha e00f6642c1417e2b3ed2849a95e9e84d886d8c99

Add getValue helper (#290)

view details

Wojciech Maj

commit sha 31797cff410d45c13d0f2f6bf10a3e7fe7a58d95

v3.0.0-beta.4

view details

Wojciech Maj

commit sha 61e33dead1485c2e08bdaca4e91f3dbf623ac08d

Expose events in onChange, onClick* functions (#291) * Expose events in onChange, onClick* functions Closes #258 * Fix tests

view details

Wojciech Maj

commit sha 8079a8a68ab735999707e8e7723e7f171c2b1fee

Add unit tests

view details

push time in 5 days

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha 3b3ae38188761e8f4eb987b412f8ae582a8ac312

Simplify unit test

view details

Wojciech Maj

commit sha 868e68bfe33a5ec294fa4daff9ae35f3b54de50d

Add unit test for inherited activeStartDate value

view details

push time in 5 days

pull request commentwojtekmaj/react-calendar

Add value to onActiveStartDateChange and onViewChange callbacks arguments

@mikeyharris89 Please let me know what you think.

wojtekmaj

comment created time in 5 days

issue commentwojtekmaj/react-calendar

Prevent auto-switching when selecting date in next month

Makes sense :D I think merging #379 will make your hack unnecessary :)

mikeyharris89

comment created time in 5 days

PR opened wojtekmaj/react-calendar

Add value to onActiveStartDateChange and onViewChange callbacks arguments

This will make it much easier to programatically determine why a given callback was called.

For example, if value in onActiveStartDateChange remains the same, we know that it's not the calendar tile being clicked. We can use this information to eg. stop calendar view from being updated if a tile is clicked (as user requested in, for example, #378).

+15 -2

0 comment

3 changed files

pr created time in 5 days

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha 95839591ca10aa2b40d6e1b3d7765f087d9ce4f0

Add value to onActiveStartDateChange and onViewChange callbacks arguments

view details

push time in 5 days

create barnchwojtekmaj/react-calendar

branch : value-in-callbacks

created branch time in 5 days

issue commentwojtekmaj/react-calendar

Changing value prop of Calendar does not change the month view of selected date

@giacomocerquone I think it's not actually related, but similar :)

@Muttakee31

I created a CodeSandbox with your code slightly modified and I don't see an issue - when I click a button that updates the date to last April 2020's weekend, I'm correctly moved to April 2020.

https://codesandbox.io/s/react-calendar-controlled-with-value-and-activestartdate-change-bwr6k

The only bug I see is that you can't use navigation arrows in the calendar. React-Calendar is version 3.x, so using activeStartDate (as opposed to defaultActiveStartDate) is telling React-Calendar that you'll handle updating it. Without onActiveStartDateChange will indeed cause the Calendar to be "stuck" on a given month/year/whatever.

It's just like <input> with value but no onChange - if you try typing something in this field, it will not update.

Muttakee31

comment created time in 5 days

issue commentwojtekmaj/react-date-picker

Interacting with Calendar and then changing the date does not cause Calendar view to update

This bug will be fixed in React-Date-Picker once a discussion in https://github.com/wojtekmaj/react-calendar/issues/358 comes to an end. Please be patient. It's highest priority of them all at the moment.

HARIKSREEE

comment created time in 5 days

issue closedwojtekmaj/react-calendar

Prevent auto-switching when selecting date in next month

Hey i saw this issue https://github.com/wojtekmaj/react-calendar/issues/199 which was asking the same thing, which was marked as resolved because at the time there wasn't an option.

Any updates on this? Ideally on click of a day in the second month (when selecting multiple dates), the months wouldn't switch. I'm guessing it would involve preventing the activeStartDate from changing, but i'm not sure how to do that.

closed time in 5 days

mikeyharris89

issue commentwojtekmaj/react-calendar

Prevent auto-switching when selecting date in next month

Mind sharing your fix with us? :)

mikeyharris89

comment created time in 5 days

issue commentwojtekmaj/react-calendar

Calendar doesn't update view with outside click

Though I think I didn't quite properly understand why the second point doesn't work for calendar navigation.

Because both using navigation arrows and setting a new value causes internal activeStartDate to be updated. We can set it to undefined in the latter case, but it doesn't change anything - the bug will still be there reproduced like so:

  1. Navigate back/forward/up in Calendar
  2. Change value prop
  3. Calendar doesn't update the view

So, the bug is really there, but I don't think it could be coded any better. The solution is to handle all variables (so: activeStartDate too), if you opted in for a controlled calendar. This without a doubt requires better documentation.

So based your example, all you have to do to fix this:

export default function App() {
  const [date, setDate] = useState(undefined);
  const [activeStartDate, setActiveStartDate] = useState(undefined);

  return (
    <div className="App">
      <Calendar
        activeStartDate={activeStartDate}
        value={date} 
        onActiveStartDateChange={setActiveStartDate}
        onChange={setDate}
      />

      <button
        onClick={() => {
          const dateToSet = new Date();
          dateToSet.setMonth(10);

          const beginOfMonth = new Date(dateToSet.getFullYear(), dateToSet.getMonth(), 1);

          setActiveStartDate(beginOfMonth);
          setDate(dateToSet);
        }}
      >
        Change
      </button>
    </div>
  );
}

CodeSandbox

You should probably also make view controlled as well, to ensure the user lands on "month" view on button click.

liborzahradka

comment created time in 5 days

issue commentwojtekmaj/react-calendar

Set calendar view

It's a little hard without the code sample, but there are several possible implementations you could have done:

  • Passing first value to the both calendars - in this case all you need is simply fix it to pass the second one to it :)
  • Passing [startValue, endValue] to both calendars - in this case you will need to add activeStartDate to the second calendar to force it to display 2nd calendar. Be careful though, this causes Calendar's activeStartDate to be completely controlled and you will need to handle onActiveStartDateChange callback as well.
  • Calculating activeStartDate once and passing it to both calendars - in this case you'd need to calculate it separately for both calendars.
guydewinton

comment created time in 5 days

issue commentwojtekmaj/react-calendar

Prevent auto-switching when selecting date in next month

Hmmmm, I suppose you could be able to filter that out if I added value (being next value) to onActiveStartDateChange callback. This way you could only accept activeStartDate change if value is about to change, by comparing it with the value you hold. How does that sound?

mikeyharris89

comment created time in 5 days

issue commentwojtekmaj/react-calendar

Calendar doesn't update view with outside click

I'm not sure if it's a bug or a feature :D

React-Calendar 3.0 can be used as a controlled or as an uncontrolled component. Using value, similarly to when added on <input>, indicates we're opting for a controlled component.

If you add value prop, you're expected to handle changing it by providing onChange function.

activeStartDate, when not provided, is "defaulting" to the value inherited from current value and, if this is also not provided, from new Date().

Navigating in the Calendar sets activeStartDate in Calendar's state. Also, changing value alters activeStartDate in Calendars's state. This is because, for example, if you click a date in a neighboring month, Calendar is expected to change the view to the one in which the date you clicked is in. The latter was implemented in #322 (fixing #305).

So:

  • ❌ We can't really remove setting activeStartDate on value change
  • ❌ We could set activeStartDate to undefined on value change, fixing the problem in this particular case (it'd default to the value inherited from current value), but it would not fix the problem if activeStartDate was set using Calendar navigation.

What can we do, then? Update documentation. Unless I'm mistaken, there's no other way to keep these variables in sync, other than requiring the user to opt in to fully controlled Calendar, or fully uncontrolled one. If they need to alter value, and expect activeStartDate to change, it also needs to be provided.

liborzahradka

comment created time in 5 days

issue commentwojtekmaj/react-calendar

Prevent auto-switching when selecting date in next month

You can use React-Calendar 3.0 as a controlled component. If you provide activeStartDate, it will take the priority over what's the default behavior.

mikeyharris89

comment created time in 5 days

issue closedwojtekmaj/react-calendar

Impossible to remove dash from NavigationLabel in showDoubleView mode

Hello, @wojtekmaj! I am using Calendar in showDoubleView mode. I want to customize navigation bar through navigationLabel prop. Unfortunately, according to the source code, there is no chance to get rid of this dash between labels. Is it possible to add a feature to remove dash?

closed time in 5 days

ValeryStatinov

issue commentwojtekmaj/react-date-picker

Easier styling

You can pass your own className and calendarClassName, if you need to implement styling on your own using libs like styled-components. Adding style prop isn't a good idea in my opinion because there are tons and tons of elements inside the wrapper that would need to be styled this way.

paambaati

comment created time in 6 days

issue commentwojtekmaj/react-date-picker

change in year value is not updating the calendar

Confirmed bug. We're using React-Calendar improperly; value is controlled, but activeStartDate is not. Selecting date in Calendar causes it to set activeStartDate internally, so Calendar is no longer updating.

HARIKSREEE

comment created time in 6 days

issue commentwojtekmaj/react-calendar

How to display only current month and disable all clickables(year,month, next, prev...etc) except day?

@giacomocerquone I do have issues finding free time to address the issues lately, so any community support is highly appreciated :) Thanks!

srikanthpathlavath

comment created time in 6 days

issue closedwojtekmaj/react-calendar

Disable Click of Label in Navigation Bar

Is there a way to disable the functionality when you click the label within the navigation bar? I want to be able to use next and previous buttons, but have nothing happen when the label is clicked.

I'm using double month view, and when i click the label (ie May 2020 - June 2020) it changes to year view. I've stopped this by explicitly setting view="month" but now on click of this, it resets the calendar to the beginning of the year.

closed time in 6 days

mikeyharris89

issue commentwojtekmaj/react-calendar

Disable Click of Label in Navigation Bar

Thanks @giacomocerquone!

mikeyharris89

comment created time in 6 days

pull request commentwojtekmaj/react-lifecycle-methods-diagram

Add hooks lifecycle

I need a substantial amount of time to figure out and code the navigation, or perhaps splitting this into a separate app completely.

ReactAcademyCa

comment created time in 6 days

issue commentwojtekmaj/react-date-picker

Force time of day?

Interesting idea :) By the way, check out React-DateTimeRange-Picker.

plamenh

comment created time in 8 days

issue commentwojtekmaj/react-pdf

PDF scale 3.5 taking longer to load in 4K responsive screen

Well, 4K screens has 4x the pixels, so 4x the amount of work to rendering.

NethraRaghu

comment created time in 11 days

startedWICG/inert

started time in 12 days

push eventwojtekmaj/make-cancellable-promise

Wojciech Maj

commit sha f35baf37006f9a9b1445a3709a03def441f154b7

Rewrite basic usage with React example to hooks

view details

push time in 13 days

PR closed wojtekmaj/react-clock

changed setState to setValue

In your readme example you have a functional component with hook useState but in useEffect you are writing this.setState({ date: new Date() }); like it is a class component, so its not working. I changed it to setValue(new Date()) and now it`s working. P.S. Thank you for this clock component it really helped me!

+46 -52

1 comment

1 changed file

kasmr

pr closed time in 13 days

pull request commentwojtekmaj/react-clock

changed setState to setValue

Thanks for this contribution! Cherry-picked and fixed this error in 63de894 in order not to introduce unrelated changes.

kasmr

comment created time in 13 days

push eventwojtekmaj/react-clock

Wojciech Maj

commit sha 63de8944326f709f0c686860f11c584d2144add7

Rewrite basic usage example to hooks

view details

push time in 13 days

issue commentwojtekmaj/react-pdf

Is pinch zoom support built in?

There's no official recommendation. The only thing that I could recommend is to use SVG rendering because it should remain sharp regardless of the scale and potentially reduce the amount of rendering. Other than that - implement it as you would with an img tag.

danwt

comment created time in 14 days

issue commentGoogleChromeLabs/prerender-loader

Not working "templateParameters" when prerender-loader used

Actually, since https://github.com/jantimon/html-webpack-plugin/pull/972 html-webpack-plugin loader has force flag that skips the very if() you aimed to delete. So it could be as easy as to add force: true. 🤔

vladlavrik

comment created time in 14 days

issue commentwojtekmaj/react-pdf

Document reload issue.

Could you fork the CodeSandbox above and try and reproduce what you experience so I could see what's the cause?

premsonbaby

comment created time in 15 days

issue commentGoogleChromeLabs/prerender-loader

Jsdom is obsolete

Fixed in #46, waiting for merge...

dunal

comment created time in 15 days

push eventwojtekmaj/react-pdf

Wojciech Maj

commit sha 0e33c16468cb45d7ff25dd3af818f650741447e3

Update Webpack configuration

view details

push time in 15 days

GollumEvent

push eventwojtekmaj/react-time-picker

Wojciech Maj

commit sha 43dfd65fd98b7ab48a163518479eacf6bde818e6

Rewrite basic usage example to hooks

view details

push time in 17 days

push eventwojtekmaj/react-pdf

Wojciech Maj

commit sha 683bffb2254e612a46b95d21fcabfd49e88fdd02

Rewrite basic usage example to hooks

view details

push time in 17 days

push eventwojtekmaj/react-clock

Wojciech Maj

commit sha bb15f4e5851f43dd64af5d2cfa94b6cb3f0e87f8

Rewrite basic usage example to hooks

view details

push time in 17 days

push eventwojtekmaj/react-datetimerange-picker

Wojciech Maj

commit sha 3631471e862cdf2384019a736cc01480cfb33482

Rewrite basic usage example to hooks

view details

push time in 17 days

push eventwojtekmaj/react-datetime-picker

Wojciech Maj

commit sha 7b4846f4a3b920b46cba8851b452466abb0b6f19

Rewrite basic usage example to hooks

view details

push time in 17 days

push eventwojtekmaj/react-timerange-picker

Wojciech Maj

commit sha 1bc7d795439feabf8ae75b0a89923bcf1933f63a

Rewrite basic usage example to hooks

view details

push time in 17 days

push eventwojtekmaj/react-date-picker

Wojciech Maj

commit sha 0f28c6b2bd10864e314eef22005b6d470b79108e

Rewrite basic usage example to hooks

view details

push time in 17 days

push eventwojtekmaj/react-daterange-picker

Wojciech Maj

commit sha e0b550cffc3569e65a49df781a825af29a20bbd1

Rewrite basic usage example to hooks

view details

push time in 17 days

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha ec1297087b1dc57c8d24f2700d00f88b84fc1bd3

Rewrite basic usage example to hooks

view details

push time in 17 days

GollumEvent

release wojtekmaj/react-calendar

v3.1.0

released time in 17 days

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha 68f525b81c0f5b2f55df300990f4c038f1c012c6

v3.1.0

view details

push time in 17 days

created tagwojtekmaj/react-calendar

tagv3.1.0

Ultimate calendar for your React app.

created time in 17 days

issue commentwojtekmaj/react-calendar

Disable dates, but not the navigation

Thanks for the kind words. Unfortunately Navigation blocks navigating to any view which doesn't contain a single enabled tile (enabled = not limited by min/max date).

brett-chisholm

comment created time in 17 days

issue closedwojtekmaj/react-pdf

Infinite loop? might be a bug but im not sure

I'm not sure what has changed but it's a little guidance on what might cause this could be useful. It seems like this project is infinitely requesting the PDF from the URL. My initial feeling was that this might be a defect on your side but I can't seem to see any changes that came into my project from you which leads me to believe maybe I'm returning data in a different way and it results in this behavior and I was hoping that you might point me in the right direction?

What are you trying to achieve? Please describe.

I have an existing application that uses this project to display PDF's that I have stored in S3. Haven't made any changes here that I'm aware of. pretty bland/straight-forward:

<div className="modal-body">
                  <form>
                    <Document
                    file={{url: this.state.pdfUrl}}
                    onLoadSuccess={this.onDocumentLoadSuccess}
                    >
                      <Page pageNumber={pageNumber} />
                    </Document>
                  </form>
                </div>

Describe solutions you've tried

first part of my process is I request a pre signed URL that I normally pass here for PDFurl but to simplify things I just hard-coded the URL. If I take the pre-signed URL it opens and downloads fine however the above code seems to make an infinite amount of request to receive the PDF. All of them returning a status 200 and I have to reload the page to get it to stop.

I have also confirmed that my code isnt setting the state of the application more than once.

Environment

  • Browser: Chrome Version 81.0.4044.138 (Official Build) (64-bit)
  • React-PDF version "react-pdf": "^4.1.0",
  • React version [e.g. 16.3.0]: "react": "^16.12.0",

closed time in 17 days

nexeh

issue commentwojtekmaj/react-pdf

Infinite loop? might be a bug but im not sure

https://github.com/wojtekmaj/react-pdf/wiki/Frequently-Asked-Questions#react-pdf-reloads-itself-with-every-render-whats-going-on

nexeh

comment created time in 17 days

issue commentwojtekmaj/react-pdf

Issue on displaying Image from link

Looks like a wrong repository to me 🤔 Perhaps you meant @diegomura's @react-pdf/react-pdf?

mhkasif

comment created time in 17 days

issue closedwojtekmaj/react-pdf

Issue on displaying Image from link

I'm facing a problem with the Image. I'm receiving a link from firebase storage and on placing it in src it shows some CORS error. I even tried placing headers etc but nothing changed FIREBASE IMAGE LINK

Screenshot 2020-05-11 at 1 48 21 AM Screenshot 2020-05-11 at 1 48 45 AM

closed time in 17 days

mhkasif

issue commentwojtekmaj/react-pdf

Document reload issue.

This looks fine to me. onLoadSuccess is called once for me regardless of what I'm doing, indicating that the document is not re-loading.

premsonbaby

comment created time in 17 days

issue commentwojtekmaj/react-pdf

Document reload issue.

CodeSandbox: https://codesandbox.io/s/new-grass-elnie

premsonbaby

comment created time in 17 days

issue commentwojtekmaj/react-date-picker

The prop `value` is marked as required in `DatePicker`

I'm afraid I'm not working on typings - this is entirely up to the community.

React propTypes for value prop are not set as isRequired.

meandillar

comment created time in 17 days

push eventwojtekmaj/react-calendar

Utkarsh Gupta

commit sha a6b0a2e12fee63d0d0d7b46f8bfd27b8dda265d1

Fixed re-rendering issue in Calendar component (#300) * Fixed re-rendering issue in <Calendar/> component The `onMouseLeave` prop of `<MonthView/>` should be `null` when `selectRange` is not set. It is causing unnecessary re-rendering of the whole `<Calendar/>` component on the hover of `<Weekdays/>` component (child of `<MonthView/>` ) due to fire of the `onMouseOver` event passed in its child `<Flex/>` . * Remove unnecessary prop Co-authored-by: Wojciech Maj <kontakt@wojtekmaj.pl>

view details

push time in 17 days

PR merged wojtekmaj/react-calendar

Fixed re-rendering issue in Calendar component

The onMouseLeave prop of <MonthView/> should be null when selectRange is not set. It is causing unnecessary re-rendering of the whole <Calendar/> component on the hover of <Weekdays/> component (child of <MonthView/> ) due to fire of the onMouseOver event passed in its child <Flex/> .

+1 -1

1 comment

1 changed file

UtkarshPramodGupta

pr closed time in 17 days

push eventUtkarshPramodGupta/react-calendar

Wojciech Maj

commit sha b8e20b911afabcefdb66b5792a54e91df538610a

Remove unnecessary prop

view details

push time in 17 days

PR merged wojtekmaj/react-calendar

Add hoverStart/hoverEnd CSS classes to style hovered date range

image

I'm trying to style react-calendar so that the start and end of a range in-progress has rounded corners. Currently, react-calendar only exposes the start and end of the confirmed range (i.e. the range that's in value). This PR exposes the start and end of the unconfirmed range via hoverRangeStart, hoverRangeEnd, and hoverRangeBothEnds CSS classes.

I named them hoverRange because it seemed consistent with the current --hover class, but I'm happy to rename them as you see fit.

Thanks!

+126 -48

1 comment

2 changed files

bywo

pr closed time in 17 days

pull request commentwojtekmaj/react-calendar

Fixed re-rendering issue in Calendar component

Good catch - thank you!

UtkarshPramodGupta

comment created time in 17 days

push eventUtkarshPramodGupta/react-calendar

Wojciech Maj

commit sha 35899bdd55e8e459d64ee1eff85fc9e226f50329

Update src/Calendar.jsx

view details

push time in 17 days

Pull request review commentwojtekmaj/react-calendar

Fixed re-rendering issue in <Calendar/> component

 export default class Calendar extends Component {           showFixedNumberOfWeeks,           showNeighboringMonth,           showWeekNumbers,+          selectRange
          selectRange,
UtkarshPramodGupta

comment created time in 17 days

push eventwojtekmaj/react-calendar

Byron

commit sha 254b0cf12e1e09c6b248d7384d9641071bf9c78a

Add hoverStart/hoverEnd CSS classes to style hovered date range (#373) Co-authored-by: Wojciech Maj <kontakt@wojtekmaj.pl>

view details

push time in 17 days

pull request commentwojtekmaj/react-calendar

add hoverRangeStart/End CSS classes to style the date range that's in-progress

Thanks for your input!

Added a layer of abstraction that forced me to change class names to hoverStart, hoverEnd, but at the same time forced me to keep it all consistent.

Side effect: New class name: --range.

Non breaking change - approved

bywo

comment created time in 17 days

push eventbywo/react-calendar

Wojciech Maj

commit sha a85dd747ddde17eb92d342c39f75d0e0a9476f52

Add abstraction layer to improve clarity, add --range className, add unit tests

view details

push time in 17 days

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha 9da670efb3196c0d35752c2ad1523e90f4a57979

Add Sergi Meseguer to contributors

view details

push time in 17 days

push eventwojtekmaj/react-calendar

Sergi Meseguer

commit sha 11c4e0e0cbd867fc45b0a99a479b8c418a362de4

Add class names to Navigation label items to allow custom styling (#333)

view details

push time in 17 days

PR merged wojtekmaj/react-calendar

Add class names to Navigation label items to allow custom styling

Hi,

I send you this PR to allow users to style the separation text between two dates in showDoubleView mode. More correct approach would be to also allow for custom text in that separator, but I thought I'd keep it simple for you to evaluate.

Thank you

+31 -18

2 comments

1 changed file

zigotica

pr closed time in 17 days

pull request commentwojtekmaj/react-calendar

Add class names to Navigation label items to allow custom styling

Good idea - thanks @zigotica!

zigotica

comment created time in 17 days

push eventzigotica/react-calendar

Wojciech Maj

commit sha 5aebf319f18a53f82d82c74f57f5ae0c7cc72313

Update class names to follow BEM

view details

push time in 17 days

issue closedwojtekmaj/react-calendar

in select range onChange function is triggering after picking start date and end date.how to get value on both clicks

clicking on start date(valueFrom) how to get value of it and same goes for end date (valueTo)

closed time in 17 days

kumargugloth

issue commentwojtekmaj/react-calendar

in select range onChange function is triggering after picking start date and end date.how to get value on both clicks

#351 (#331) was merged - will be out with the next release.

kumargugloth

comment created time in 17 days

delete branch wojtekmaj/react-calendar

delete branch : allow-partial-range

delete time in 17 days

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha 0ed0dac213fe60a6ab3032f10e17ce5b0709b6dd

Add support for allowPartialRange (#351) * Add support for allowPartialRange Closes #331

view details

push time in 17 days

issue closedwojtekmaj/react-calendar

Allow getting partial results via onChange

When selecting range, allow devs to opt-in to get "WIP" values with 1 piece of range only.

closed time in 17 days

wojtekmaj

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha 8e610bca7d123982f3f93f513a1dd36cc6785842

Ensure activeStartDate in calendar views is the beginning of the view Fixes #345

view details

Wojciech Maj

commit sha 18701fb275b6425c2c70803c64197157ffb8d6d6

Update Babel to 7.9.0

view details

Dan Wood

commit sha 67b49afde4e93b9c7cc720162def4134c76c2b89

Explain hiding icons (#364) * Explain hiding icons Explicitly state that setting next and prev attributes to `null` will hide them * Fix trailing space Co-authored-by: Wojciech Maj <kontakt@wojtekmaj.pl>

view details

Katie Soldau

commit sha 572eff8180d17f498aefbe5c59946ad434b849dd

Add tests that ensure the calendar is correct when setting activeStartDate and defaultActiveStartDate (#361) * Add tests that ensure the dates in a month are lined up with the correct weekdays * linting

view details

Wojciech Maj

commit sha a17c5fe0e677203421fa75991fee4ade00ddfe2a

Get rid of callIfDefined() in favor of a simple if()

view details

Wojciech Maj

commit sha b0cce45a32ebee1b65c084edca8b30a55a86666e

Update badges

view details

Wojciech Maj

commit sha 44db30018c4a0af5b27ab413a7b481ea467e6602

Update eslint-plugin-react-hooks

view details

Wojciech Maj

commit sha 350eb6a7c7fd4fd6750429f297a2baf0284481a8

Upgrade Jest to v26

view details

Wojciech Maj

commit sha 01525ed60eae7e1109ee70ffe0424432098f5032

Update README.md

view details

Wojciech Maj

commit sha 857770140fd74f587ca7302b7865a7aebfcc74ff

Add support for allowPartialRange Closes #331

view details

Wojciech Maj

commit sha 2f0604e207c3f501421805ec5c9c3039b5a37f11

Add docs, add unit tests

view details

Wojciech Maj

commit sha 7ff007787f9bf2c244e2c5e61a8d267f71f615de

Add missing propType

view details

push time in 17 days

push eventwojtekmaj/react-calendar

Wojciech Maj

commit sha 1c6ea5e3db6c8550f4beb78a3294a042b21a811e

Add docs, add unit tests

view details

push time in 17 days

more