react-native-calendar icon indicating copy to clipboard operation
react-native-calendar copied to clipboard

Inconsistency in passing value to callbacks

Open Andreyco opened this issue 9 years ago • 1 comments

I spotted inconsistency in callback values. Namely these: onSwipePrep and onSwipeNext receive moment instance. onDateSelected receives date in plain string format.

Unifying this issue is essentially a breaking change, but it would be nice to be consistent.

Andreyco avatar Jul 19 '16 20:07 Andreyco

@Andreyco Good catch! I agree that it would be better to make things consistent. Maybe its best to return a plain JS Date object instead of a string/moment instance?

We can add a console.warn to these callbacks after we make the changes to let users know about the breaking change.

Any chance you can put together a PR with these updates?

christopherdro avatar Oct 30 '16 17:10 christopherdro