After thinking about it, perhaps this behavior is okay. If you want the year/month/day parts preserved, then you should be using the Ti.UI.PICKER_TYPE_DATE_AND_TIME type. Especially since one problem with preserving the date in a Ti.UI.PICKER_TYPE_TIME is it has a daylight savings time issue where 2 AM cannot be selected on a spring-forward day (such as 2018/03/11), which is currently the case for both Android and iOS. This behavior would be okay in a date-time picker, but perhaps not in a time-only picker.
A Ti.UI.Picker of type PICKER_TYPE_TIME does not retain the originally assigned year, month, day, and seconds assigned to its value property. The date returned by value is always set to the current date (this is wrong), with the hour and minute components set to what's selected in the picker (this last part is fine).
On iOS, all other date components (year, month, day, seconds) are preserved. Android should do the same.
- Build and run the below code on Android.
- Tap the "Get Selected Time" button.
- An alert dialog displays the picker's current date and time. Note that the date is set to current day instead of the hardcoded 2018/01/01.
This is an issue with Titanium's "TiUITimeSpinner" Java class...
You can extract the hour and minute selected from the picker and recreate a date object with the correct time like this...