t0gre / react-datepicker

An easily internationalizable, accessible, mobile-friendly datepicker library for the web, build with styled-components.
https://react-datepicker.netlify.com/
MIT License
331 stars 54 forks source link

Possible fix for react native support #96

Closed Jonatthu closed 4 years ago

Jonatthu commented 4 years ago

image

Jonatthu commented 4 years ago

For unblock yourself declare on the App.tsx

import { AppCore } from '@app/core'; import React from 'react';

import './PlatformImports'; import { Platform } from 'react-native';

// Temporal fix for datepicker if (Platform.OS === 'ios') { window.addEventListener = function (a, b) {}; window.removeEventListener = function (a, b) {}; }

export default function App() { return ; }

// import Storybook from './storybook/index'; // export default Storybook;

// if (Platform.OS !== 'web') { // NativeModules.DevSettings.setIsDebuggingRemotely(true); // }

Jonatthu commented 4 years ago

image

It is a work in progress for better ui but with this lib it is really cool to build this... 🗡️

Jonatthu commented 4 years ago

image

tresko commented 4 years ago

Nice one, thank you very much :)