react-native-wheel-pick 1.2.4 → 1.2.6
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/README.md
CHANGED
|
@@ -122,6 +122,8 @@ onDateChange={(date: Date) => { console.log(date) }}
|
|
|
122
122
|
isShowSelectLine={false} // Default is true
|
|
123
123
|
selectLineColor='black'
|
|
124
124
|
selectLineSize={6} // Default is 4
|
|
125
|
+
|
|
126
|
+
isCyclic={true} // Support Infinitely Scrolling.
|
|
125
127
|
/>
|
|
126
128
|
|
|
127
129
|
// Android Only.
|
|
@@ -133,6 +135,13 @@ onDateChange={(date: Date) => { console.log(date) }}
|
|
|
133
135
|
<Picker style={{ height: 50 }} />
|
|
134
136
|
// DatePicker still not supported on Web.
|
|
135
137
|
```
|
|
138
|
+
## How to change Font Family for Android
|
|
139
|
+
|
|
140
|
+
1. Goto `android/app/src/main/res/values/styles.xml`
|
|
141
|
+
2. Add this code `<item name="wheel_font_path">fonts/[FONT_NAME].ttf</item>`
|
|
142
|
+
|
|
143
|
+
Thanks to [@RMabroukS](https://github.com/TronNatthakorn/react-native-wheel-pick/issues/58)
|
|
144
|
+
|
|
136
145
|
## FYI
|
|
137
146
|
|
|
138
147
|
I rarely check this lib. (6 Months - 3 Years). Up on my life's time.
|
|
@@ -145,6 +154,15 @@ You can sponsor me
|
|
|
145
154
|
OR you can fork this project instead.
|
|
146
155
|
|
|
147
156
|
## Release Note
|
|
157
|
+
|
|
158
|
+
### 1.2.6 (Jul 5 2025)
|
|
159
|
+
[Android]
|
|
160
|
+
- Add support for `isCyclic` property on Android. (Infinitely Scrolling) Thanks to [@cip123](https://github.com/TronNatthakorn/react-native-wheel-pick/pull/67)
|
|
161
|
+
|
|
162
|
+
### 1.2.5 (Jun 14 2025)
|
|
163
|
+
[Android]
|
|
164
|
+
- Fix Android DatePicker time mode default selection issue and correct hour range. Thanks to [@harryxu](https://github.com/TronNatthakorn/react-native-wheel-pick/pull/66)
|
|
165
|
+
|
|
148
166
|
### 1.2.4 (Feb 17 2025)
|
|
149
167
|
[Web]
|
|
150
168
|
- Test on `Platform.OS === 'web'`
|
|
@@ -190,6 +190,14 @@ public class ReactWheelCurvedPickerManager extends SimpleViewManager<ReactWheelC
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
+
// @ReactProp(name="isCyclic")
|
|
194
|
+
@ReactProp(name="isCyclic")
|
|
195
|
+
public void setCyclic(ReactWheelCurvedPicker picker, boolean isCyclic) {
|
|
196
|
+
if (picker != null) {
|
|
197
|
+
picker.setCyclic(isCyclic);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
193
201
|
@Override
|
|
194
202
|
public String getName() {
|
|
195
203
|
return REACT_CLASS;
|
package/package.json
CHANGED
|
@@ -239,12 +239,14 @@ export default class DatePicker extends PureComponent {
|
|
|
239
239
|
|
|
240
240
|
const [hours, minutes] = [[], []];
|
|
241
241
|
|
|
242
|
-
for (let i = 0; i <=
|
|
243
|
-
hours.push(i);
|
|
242
|
+
for (let i = 0; i <= 23; i += 1) {
|
|
243
|
+
// hours.push(i);
|
|
244
|
+
hours.push({ value: i, label: `${i}` })
|
|
244
245
|
}
|
|
245
246
|
|
|
246
247
|
for (let i = 0; i <= 59; i += 1) {
|
|
247
|
-
minutes.push(i);
|
|
248
|
+
// minutes.push(i);
|
|
249
|
+
minutes.push({ value: i, label: `${i}` })
|
|
248
250
|
}
|
|
249
251
|
|
|
250
252
|
return [
|