[AC-3232] Improve date picker to use Alloy.Globals reference
GitHub Issue | n/a |
Type | Improvement |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-09-05T19:28:46.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | TCSupportTriage |
Reporter | Michael Stelly |
Assignee | Mauro Parra-Miranda |
Created | 2014-08-15T13:39:35.000+0000 |
Updated | 2016-03-08T07:57:38.000+0000 |
Description
Steps to Reproduce
I have a global value for new Date() called Alloy.Globals.dates.today populated with the moment() method.
At the moment, I cannot use the global reference in my date picker like this
var datePicker = Ti.UI.createPicker({
maxDate : Alloy.Globals.dates.today
});
I think this has more to do with moment.js than the Javascript Date object. Since moment.js is supported, I would expect to be able to use it as I see fit.
Actual Result
picker is disabled.
Expected Result
sets maxDate to today.
Comments
JSON Source
Hello, We have tested this issue. Its work as expected, we can use alloy global variable (which is populated with the moment() method) inside the date picker.
Testing Environment:
Titanium SDK: 3.3.0.GA, Titanium CLI: 3.3.0, Android SDK: 4.4.3, 4.2.2, Alloy:1.4.1, iOS SDK:7.1, OS X Version: 10.9.4, Appcelerator Studio: 3.3.0Steps to test the issue:
1. Create a Alloy project. 2. Paste this code in alloy.js, index.js and index.xml file. 3. Run this code with the testing environment.Test Code
Thanks.
Please take a look into the testcase.
Thanks, Mauro. I will.