Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8153135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:55:04+00:00 2026-06-06T15:55:04+00:00

Im a Titanium Beginner who is trying to create a form page with 2

  • 0

Im a Titanium Beginner who is trying to create a form page with 2 textfields of Name and address and a DateTimePicker. I am facing 2 problems right now being :

1) the DateTimePicker is successfully shown but i would like both of it and also including the 2 textfields to be on the same window, with a same submit button.

2) I have tried numerous times but am unable to create a simple textfield at all even just creating it on a single page.It just doesnt show up.
Anyone could offer some constructive help?

Thanks in advance. The Below is my current code.

var winTimePicker = Titanium.UI.createWindow({});
winTimePicker.backgroundColor = ‘black’;

var doneBtn = Ti.UI.createButton({
    title: 'Done',
});

doneBtn.addEventListener('click', function() {
    winTimePicker.hide();
});

winTimePicker.add(doneBtn);

var timePicker = Ti.UI.createPicker({
    type:Ti.UI.PICKER_TYPE_TIME,
    bottom:0,
});


// turn on the selection indicator (off by default)
timePicker.selectionIndicator = true;

timePicker.addEventListener('change', function(e) {
    //your code
});

winTimePicker.add(timePicker);


//open window
winTimePicker.open();   

var winDatePicker = Titanium.UI.createWindow({});
winDatePicker.backgroundColor = ‘black’;

var doneBtn = Ti.UI.createButton({
    title: 'Done',
});

doneBtn.addEventListener('click', function() {
    winDatePicker.hide();
});

winDatePicker.add(doneBtn);

var datePicker = Ti.UI.createPicker({
    type:Ti.UI.PICKER_TYPE_DATE,
    bottom:0,
});


// turn on the selection indicator (off by default)
datePicker.selectionIndicator = true;

datePicker.addEventListener('change', function(e) {
    //your code
});

winDatePicker.add(datePicker);


//open window
winDatePicker.open();   

var textField = Titanium.UI.createTextField({
color:’#336699′,
width:”auto”,
height:”auto”,
borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
});

var textField2 = Titanium.UI.createTextField({
color:’#336699′,
width:”auto”,
height:”auto”,
borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
});

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:55:06+00:00Added an answer on June 6, 2026 at 3:55 pm

    Check this code out and make changes as you find suitable to it:

    var timePickerWin = Ti.UI.createWindow({
                navBarHidden : true,
                backgroundColor : '#fff'
            });
    
    var startTime = Ti.UI.createPicker({
            top : '15dp',
            left : '50dp',
            useSpinner : false,
            selectionIndicator : true,
            type : Ti.UI.PICKER_TYPE_TIME,
            format24 : false,
            height : '130dp',
            //  width:'auto'
    
        });
    
    
     var endTime = Ti.UI.createPicker({
                top : '15dp',
                left : '50dp',
                useSpinner : false,
                selectionIndicator : true,
                type : Ti.UI.PICKER_TYPE_TIME,
                format24 : false,
                height : '130dp'
            });
    
    var nextButton = Ti.UI.createButton({
                width : '220dp',
                height : '45dp',
                top : '15dp',
                title : 'Next',
                backgroundColor : '#294079',
                font : {
                    fontSize : '18dp',
                    fontWeight : 'bold'
                },
                color : '#fff'
            });
    
    startTime.addEventListener('change', function(e) {
            //alert("User selected date: " + e.value);
            startPickerValue = e.value;
        });
    
        endTime.addEventListener('change', function(e) {
            //alert("User selected date: " + e.value);
            endPickerValue = e.value
        });
    var fullNameTextBox = Ti.UI.createTextField({
            borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
            width : '275dp',
            height : '45dp',
            //value : '',
            top : '15dp',
            color : '#000000',
            hintText : 'Enter full name'
            //  backGroundColor:'gray',
    
        });
        var emailTextBox = Ti.UI.createTextField({
            borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
            width : '275dp',
            height : '45dp',
            //value : '',
            top : '15dp',
            color : '#000000',
            hintText : 'Enter email'
    
        });
    

    Finally add all these UI elements to the window which is the timePickerWin using add function

    timePickerWin.add(startTime);
    

    and so on for all the UI elements.After that open the timePickerWin as below

    timePickerWin.open()
    

    Make suitable layout changes by varying the left,right,height and width properties of each element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Titanium Appcelerator I am trying to dynamically create elements and add event listeners
I have been trying to set up Titanium and Android for 3 days. Still
I'm running into an issue with Titanium's Titanium.Yahoo.yql method on iPhone. I'm trying to
I'm trying to use Titanium.Android.Calendar API to view the device calendar (the native one),
Titanium SDK version: 1.6.1 iPhone SDK version: 4.2 I am trying to build a
I am a beginner in Titanium Studio. I am opening a new window, when
I am a beginner in Titanium Studio. I can able to open a mapview
I am an iPhone developer and a beginner in Titanium Studio. I have some
I am an iPhone developer and a beginner in using Titanium. I have started
I am an iPhone developer and a beginner in using Titanium studio. I started

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.