react-native-dates-picker 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/DateTimePicker.js +2 -1
- package/lib/commonjs/DateTimePicker.js.map +1 -1
- package/lib/commonjs/components/Calendar.js +2 -2
- package/lib/commonjs/components/DatePicker.js +3 -3
- package/lib/commonjs/components/Day.js +2 -2
- package/lib/commonjs/components/Day.js.map +1 -1
- package/lib/commonjs/components/DaySelector.js +2 -2
- package/lib/commonjs/components/Header.js +2 -2
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/MonthSelector.js +2 -2
- package/lib/commonjs/components/MonthSelector.js.map +1 -1
- package/lib/commonjs/components/TimeSelector.js +3 -3
- package/lib/commonjs/components/WheelPicker/WheelNativePicker/wheel-picker-item.js +1 -1
- package/lib/commonjs/components/WheelPicker/WheelNativePicker/wheel-picker-item.js.map +1 -1
- package/lib/commonjs/components/WheelPicker/WheelNativePicker/wheel-picker.js +1 -1
- package/lib/commonjs/components/WheelPicker/WheelNativePicker/wheel-picker.js.map +1 -1
- package/lib/commonjs/components/WheelPicker/WheelWeb.js +2 -2
- package/lib/commonjs/components/YearSelector.js +2 -2
- package/lib/commonjs/components/YearSelector.js.map +1 -1
- package/lib/module/DateTimePicker.js +2 -1
- package/lib/module/DateTimePicker.js.map +1 -1
- package/lib/module/components/Calendar.js +2 -2
- package/lib/module/components/Calendar.js.map +1 -1
- package/lib/module/components/DatePicker.js +3 -3
- package/lib/module/components/DatePicker.js.map +1 -1
- package/lib/module/components/Day.js +2 -2
- package/lib/module/components/Day.js.map +1 -1
- package/lib/module/components/DaySelector.js +2 -2
- package/lib/module/components/DaySelector.js.map +1 -1
- package/lib/module/components/Header.js +2 -2
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/MonthSelector.js +2 -2
- package/lib/module/components/MonthSelector.js.map +1 -1
- package/lib/module/components/TimeSelector.js +3 -3
- package/lib/module/components/TimeSelector.js.map +1 -1
- package/lib/module/components/WheelPicker/WheelNativePicker/wheel-picker-item.js +1 -1
- package/lib/module/components/WheelPicker/WheelNativePicker/wheel-picker-item.js.map +1 -1
- package/lib/module/components/WheelPicker/WheelNativePicker/wheel-picker.js +1 -1
- package/lib/module/components/WheelPicker/WheelNativePicker/wheel-picker.js.map +1 -1
- package/lib/module/components/WheelPicker/WheelWeb.js +2 -2
- package/lib/module/components/WheelPicker/WheelWeb.js.map +1 -1
- package/lib/module/components/YearSelector.js +2 -2
- package/lib/module/components/YearSelector.js.map +1 -1
- package/lib/typescript/DateTimePicker.d.ts.map +1 -1
- package/lib/typescript/components/Calendar.d.ts +1 -1
- package/lib/typescript/components/Calendar.d.ts.map +1 -1
- package/lib/typescript/components/Day.d.ts +1 -1
- package/lib/typescript/components/Day.d.ts.map +1 -1
- package/lib/typescript/components/Header.d.ts +1 -1
- package/lib/typescript/components/Header.d.ts.map +1 -1
- package/lib/typescript/components/WheelPicker/Wheel.d.ts +1 -1
- package/lib/typescript/components/WheelPicker/Wheel.d.ts.map +1 -1
- package/lib/typescript/components/WheelPicker/WheelNative.d.ts +1 -1
- package/lib/typescript/components/WheelPicker/WheelNative.d.ts.map +1 -1
- package/lib/typescript/components/WheelPicker/WheelNativePicker/wheel-picker-item.d.ts +1 -1
- package/lib/typescript/components/WheelPicker/WheelNativePicker/wheel-picker-item.d.ts.map +1 -1
- package/lib/typescript/components/WheelPicker/WheelNativePicker/wheel-picker.d.ts +1 -1
- package/lib/typescript/components/WheelPicker/WheelNativePicker/wheel-picker.d.ts.map +1 -1
- package/lib/typescript/components/WheelPicker/WheelWeb.d.ts +1 -1
- package/lib/typescript/components/WheelPicker/WheelWeb.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/DateTimePicker.tsx +2 -1
- package/src/components/Calendar.tsx +4 -4
- package/src/components/DatePicker.tsx +3 -3
- package/src/components/Day.tsx +3 -3
- package/src/components/DaySelector.tsx +2 -2
- package/src/components/Header.tsx +3 -3
- package/src/components/MonthSelector.tsx +2 -2
- package/src/components/TimeSelector.tsx +3 -3
- package/src/components/WheelPicker/Wheel.tsx +1 -1
- package/src/components/WheelPicker/WheelNative.tsx +1 -1
- package/src/components/WheelPicker/WheelNativePicker/wheel-picker-item.tsx +2 -2
- package/src/components/WheelPicker/WheelNativePicker/wheel-picker.tsx +2 -2
- package/src/components/WheelPicker/WheelWeb.tsx +3 -3
- package/src/components/WheelPicker/period-native.tsx +1 -1
- package/src/components/YearSelector.tsx +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { View, Text, Pressable, StyleSheet, Image } from 'react-native';
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
|
-
import { useCalendarContext } from '
|
|
5
|
-
import type { HeaderProps } from '
|
|
6
|
-
import { getDateYear, getYearRange, YEAR_PAGE_SIZE } from '
|
|
4
|
+
import { useCalendarContext } from '../CalendarContext';
|
|
5
|
+
import type { HeaderProps } from '../types';
|
|
6
|
+
import { getDateYear, getYearRange, YEAR_PAGE_SIZE } from '../utils';
|
|
7
7
|
|
|
8
8
|
const Header: React.FC<HeaderProps> = ({ buttonPrevIcon, buttonNextIcon }) => {
|
|
9
9
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text, View, Pressable, StyleSheet } from 'react-native';
|
|
3
|
-
import { useCalendarContext } from '
|
|
4
|
-
import { getParsedDate, getMonths } from '
|
|
3
|
+
import { useCalendarContext } from '../CalendarContext';
|
|
4
|
+
import { getParsedDate, getMonths } from '../utils';
|
|
5
5
|
|
|
6
6
|
const MonthSelector: React.FC = () => {
|
|
7
7
|
const { currentDate, onSelectMonth, theme } = useCalendarContext();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { Text, View, StyleSheet } from 'react-native';
|
|
3
|
-
import { useCalendarContext } from '
|
|
4
|
-
import { CONTAINER_HEIGHT } from '
|
|
5
|
-
import { getParsedDate, getDate, getFormatted } from '
|
|
3
|
+
import { useCalendarContext } from '../CalendarContext';
|
|
4
|
+
import { CONTAINER_HEIGHT } from '../enums';
|
|
5
|
+
import { getParsedDate, getDate, getFormatted } from '../utils';
|
|
6
6
|
import Wheel from './WheelPicker/Wheel';
|
|
7
7
|
|
|
8
8
|
function createNumberList(num: number) {
|
|
@@ -2,7 +2,7 @@ import React, { memo } from 'react';
|
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
3
|
import WheelNative from './WheelNative';
|
|
4
4
|
import WheelWeb from './WheelWeb';
|
|
5
|
-
import { PickerOption } from '
|
|
5
|
+
import { PickerOption } from '../../types';
|
|
6
6
|
|
|
7
7
|
interface WheelProps {
|
|
8
8
|
value: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import { Animated, Text, StyleSheet } from 'react-native';
|
|
3
|
-
import { useCalendarContext } from '
|
|
4
|
-
import { PickerOption } from '
|
|
3
|
+
import { useCalendarContext } from '../../../CalendarContext';
|
|
4
|
+
import { PickerOption } from '../../../types';
|
|
5
5
|
|
|
6
6
|
interface ItemProps {
|
|
7
7
|
option: PickerOption | null;
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
StyleSheet,
|
|
12
12
|
} from 'react-native';
|
|
13
13
|
import WheelPickerItem from './wheel-picker-item';
|
|
14
|
-
import { PickerOption } from '
|
|
15
|
-
import { useCalendarContext } from '
|
|
14
|
+
import { PickerOption } from '../../../types';
|
|
15
|
+
import { useCalendarContext } from '../../../CalendarContext';
|
|
16
16
|
|
|
17
17
|
interface Props {
|
|
18
18
|
value: number | string;
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
Text,
|
|
9
9
|
} from 'react-native';
|
|
10
10
|
import { isEqual } from 'lodash';
|
|
11
|
-
import { CONTAINER_HEIGHT } from '
|
|
12
|
-
import { PickerOption } from '
|
|
13
|
-
import { useCalendarContext } from '
|
|
11
|
+
import { CONTAINER_HEIGHT } from '../../enums';
|
|
12
|
+
import { PickerOption } from '../../types';
|
|
13
|
+
import { useCalendarContext } from '../../CalendarContext';
|
|
14
14
|
import { sin } from './animated-math';
|
|
15
15
|
|
|
16
16
|
interface WheelProps {
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
TextStyle,
|
|
8
8
|
ViewStyle,
|
|
9
9
|
} from 'react-native';
|
|
10
|
-
import { useCalendarContext } from '
|
|
11
|
-
import { getDateYear, getYearRange } from '
|
|
10
|
+
import { useCalendarContext } from '../CalendarContext';
|
|
11
|
+
import { getDateYear, getYearRange } from '../utils';
|
|
12
12
|
|
|
13
13
|
const YearSelector: React.FC = () => {
|
|
14
14
|
const { currentDate, currentYear, onSelectYear, theme } =
|