Steps to Reproduce
This is not an alloy project!
create a tab group with 2 or 3 tabs,
those tabs are from seperate .js files
add this click event listner to the textfield
textField.addEventListener('click', function(e) {
var pickerLabel = Ti.UI.createLabel({
text : e.source.columnName
});
var cancel = Titanium.UI.createButton({
title : 'Cancel',
style : Titanium.UI.iPhone.SystemButtonStyle.BORDERED
});
var done1 = Titanium.UI.createButton({
title : 'Done',
style : Titanium.UI.iPhone.SystemButtonStyle.DONE
});
var spacer = Titanium.UI.createButton({
systemButton : Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
});
var toolbar1 = Titanium.UI.iOS.createToolbar({
bottom : 210,
items : [cancel, spacer, pickerLabel, spacer, done1]
});
var timeInField = e.source.value;
var arrayOfTime = e.source.value.split(':',3);
var tvalue = new Date();
tvalue.setHours(arrayOfTime[0]);
tvalue.setMinutes(arrayOfTime[1]);
tvalue.setSeconds(arrayOfTime[2]);
var picker = Ti.UI.createPicker({
type : Ti.UI.PICKER_TYPE_TIME,
//useSpinner for Android Only
useSpinner : true,
value : timeInField === '00:00:00' ? new Date() : tvalue,
selectionIndicator : true,
bottom : 0,
});
cancel.addEventListener('click', function(e) {
textField.setValue(timeInField);
picker.hide();
toolbar1.hide();
});
picker.addEventListener('change', function() {
var d = new Date(picker.getValue());
hour = d.getHours();
min = d.getMinutes();
milli = d.getMilliseconds().toString();
millid = milli.length >1 ? milli.substring(0, milli.length-1) : milli;
textField.setValue(hour+':'+min+':'+millid);
});
done1.addEventListener('click', function(e) {
var d = new Date(picker.getValue());
hour = d.getHours();
min = d.getMinutes();
milli = d.getMilliseconds().toString();
millid = milli.length >1 ? milli.substring(0, milli.length-1) : milli;
textField.setValue(hour+':'+min+':'+millid);
picker.hide();
toolbar1.hide();
});
alert('Clicked on time field');
Ti.API.info('Adding: picker to window' );
self.add(picker);
self.add(toolbar1);
Ti.API.info('Picker should be shown' );
});
Actual Result
On iOS simulator and device the click listener is fired but the picker never shows
This is now the 3rd thing that has broken since upgrading to 3.2.0 and apart from completley uninstalling titanium,
and hoping to find an earlier release I cannot revert back, which has made the whole project worthless
sorry but I'm extremley un happy that this is not the 2nd thing that should work, as it has not been deprecated, that is broken
Expected Result
the picker should show
Hi I've been doing some more digging and found that this isn't related to a tabgroup. I am unsure if this is by design or a bug but if the main window has layout:'vertical' set then the pickers never show and from what i can tell this isn't related to the SDK version
Apologies for your issues. Why can't you use 3.1.3? You only need to upgrade to 3.2.0 completely if you are using Alloy.
[~tempest] I am glad that you are back on track with your project now. Would you like this ticket to be resolved or track a particular issue here? It is a little confusing with different issues mentioned in this ticket.
[~tempest] Could you provide us with a full test case, as that would help narrow down issue quickly. This could be a multi-context issue. But without knowing where or which context this textfield is being attached to, we won't be able to narrow it down.
[~tempest] We wanted to follow up on this ticket and see if you can provide a test case to reproduce this issue. We have not been able to reproduce this issue in-house.
Test Project for this issue and another I have
Hi Ritu I've had some issues with rlf work, unfortunately I don't do this as a day job, I have created a test case now, that includes another issue i was having, anyway the 2nd page and 3rd page shows the two differences when running the same code, but with one window layout set to vertical and the other not Thanks
I tested this issue with slightly modified code. It’s working as expected for me. Please check my test code and let me know if you have any problem.
Test Environment
Mac OX S 10.8.5 Ti SDK 3.2.0.GA Ti CLI 3.2.0 IOS Simulator 7.0.3Test Code
link: https://github.com/csemrm/testNavBarTest to step
As per reporter descriptionTest result
Not SDK bug ThanksHi, impelemented the same changes in our main app, and works as expected, didn't think of doing it that way, strange it worked before before 3.2.0 though, at least it works :-) Thanks Steve