cordova-plugin-datepicker icon indicating copy to clipboard operation
cordova-plugin-datepicker copied to clipboard

DatePicker in Android to support spinner mode instead of calendar mode

Open johnver opened this issue 7 years ago • 4 comments

Is there a way to force the datepicker in android to default to spinner style instead of calendar view?

android:datePickerMode

Defines the look of the widget. Prior to the L release, the only choice was spinner. As of L, with the Material theme selected, the default layout is calendar, but this attribute can be used to force spinner to be used instead.

Must be one of the following constant values.

spinner - 1 calendar - 2

johnver avatar May 10 '17 08:05 johnver

use theme appcampat and add option "androidTheme: 1"

lovelyelfpop avatar May 12 '17 07:05 lovelyelfpop

@lovelyelfpop I'm trying to achieve the same thing - I'm trying to use time spinner instead of let's say "clock" which is less convenient in my opinion. Cound you help me? I have already set androidTheme: 1 in plugin config, added android:theme="@style/Theme.AppCompat" to activity_main.xml and i can't force it to work as I expect. The app compiles but there is still "clock" picker

kleyy avatar Oct 16 '17 20:10 kleyy

Having the same issue here, doesn't change to spinner view by putting androidTheme: 1

yunhan0 avatar May 09 '18 00:05 yunhan0

+1

rpalacio86 avatar Nov 02 '18 14:11 rpalacio86