[AC-3504] Theme property for datepicker
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2016-04-26T18:27:25.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Rainer Schleevoigt |
Assignee | Shak Hossain |
Created | 2016-04-14T10:28:33.000+0000 |
Updated | 2016-04-26T18:53:22.000+0000 |
Description
With binding the app to a theme I would modify the colors etc. of date picker. But maybe an app has different departments and for every part I need different colors.
Conclusion: We need a theme property in datepicker like we have in window.
var picker = Ti.UI.createPicker({
theme : 'Theme.firstColor',
type : Ti.UI.PICKER_TYPE_DATE,
minDate : new Date(2009, 0, 1),
maxDate : Moment().toDate(),
value : parent.date.toDate(),
locale : 'de'
});
Hello, Thanks for the query. Style of datepicker in Appcelerator can be customized as it can be customized on native android. You have to add the picker in a window and you can add a theme in that window. In that theme you can customize the datepicker item like this:
*Sample Custom Theme XML*
Thanks
Thanks for quick answer. The picker inherits from parent (window). But I have in window different sections (scrollableView) and depending of view I dream of different colors. Background: we have a couple of radiostations with own colors. Depending of station we looking for different colors. Is it possible to change the theme of windows dynamicly?
Hi [~titanium@webmasterei-hamburg.de], You cannot change the theme of an existing window, so you'd need to close the existing window and reopen it with the newly selected theme as the value for "theme" in the params for createWindow(). It’s a known fact in Native Android that themes cannot be changed during run time. If the new theme change has to be reflected in the application, all the views have to be re-inflated, as the theme based values are parsed only once during inflation. Thanks
Hello [~titanium@webmasterei-hamburg.de], As you are requesting a new feature, It always better to provide example screenshots of the said feature available in native platform. Please provide example of the feature done in native android. Regards, Sharif.
Which native element will called by using of datapicker?