Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4774] Android : *calendarViewShown* not working

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2017-02-16T20:00:11.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
ComponentsAlloy
Labelsn/a
ReporterAshish Sebastian
AssigneeShak Hossain
Created2017-02-03T12:46:25.000+0000
Updated2017-02-17T05:41:03.000+0000

Description

Hello, I have been trying to the date picker in Android which works perfectly fine, My issue is with the *calendarViewShown* property. I need to use old style Date picker in the all the versions of android, this works as default in android 4 and lower but when we run the app on android 5 and later the default date picker shows the calendar and instead i would want use the old date picker. For which i have used the property *calendarViewShown* and as shown in the below pic I'm not getting the expected result.

Attachments

FileDateSize
current Result.png2017-02-03T12:44:52.000+000066721
expected Result.png2017-02-03T12:45:29.000+000053851

Comments

  1. Hans Knöchel 2017-02-03

    I think this is the native behavior for Android 5+. [~fmerzadyan] can you confirm this?
  2. Ashish Sebastian 2017-02-03

    *@Hans* : this is a default behavior if we do not use this property for Android 5+, but as the docs suggest this property to work and the picker should change to the older style in Android 5+. [http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Picker-property-calendarViewShown]
  3. Sharif AbuDarda 2017-02-03

    This is a valid bug. Setting "calendarViewShown" false should not view "calenderView" in Android 5+. As, "calenderView" is default behavior in Android 5+ the docs should mention that.
  4. Sharif AbuDarda 2017-02-08

    [~fmerzadyan], Any thoughts?
  5. Sharif AbuDarda 2017-02-13

    Hello, There are couple of things to consider. 1. According to the Android docs, https://developer.android.com/reference/android/widget/DatePicker.html#attr_android:calendarViewShown should valid if both calendarViewShown="false" and datePickerMode="spinner" is set, But
       <Picker calendarViewShown="false" type="Ti.UI.PICKER_TYPE_DATE" datePickerMode="spinner"></Picker>
       
    this does not work. 2. Do we have "datePickerMode="spinner"" for Titanium? 3. According to our docs http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Picker-property-useSpinner "useSpinner" is deprecated since 5.2.1, But this still works
       <Picker useSpinner="true" type="Ti.UI.PICKER_TYPE_DATE" ></Picker>
       
    for the old spinning wheel date picker. Checked on Android 7.0.0 emulator with SDK 6.0.1 [~hansknoechel], Any thoughts?
  6. Gary Mathews 2017-02-16

  7. Sharif AbuDarda 2017-02-16

  8. aakashsharma 2017-02-17

    Hey , Ashish , finally i resolve this issue , you have to use theme with the picker then u get the older version picker in latest android 5.0 or more. //********xml code ********* pasty that theme in platfrom >custometheme.xml> //*************theme //**************

JSON Source