aspose file tools*
The moose likes Android and the fly likes Date and Time Spinner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Date and Time Spinner" Watch "Date and Time Spinner" New topic
Author

Date and Time Spinner

ibrahim yener
Ranch Hand

Joined: Jul 22, 2013
Posts: 129

Hello
I want to know that how can i make date and time selected in spinner.

Let me give some example based on HTML

<select name="year">
<option value="2012">2012</option>
<option value="2013" selected="selected">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
</select>

Also, i have to date time spinner in my application and i want to set Date To spinner based on Date From spinner.

If user choose 2013/11/14 18:00 from Date From spinner (Every Date and Time has on separate spinner)
populate exact same date and time at Date To spinner.

It is exactly, Airline reservation calendar. If you choose Flight date From javascript populates automatically date To too.

Regards


WinSystems my Google play account.
Ping Kong
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Your best choice is to use Date and Time pickers instead of spinners: http://developer.android.com/guide/topics/ui/controls/pickers.html

But it you want to use a spinner, then here is how to use them: http://developer.android.com/guide/topics/ui/controls/spinner.html


Steve
ibrahim yener
Ranch Hand

Joined: Jul 22, 2013
Posts: 129

Steve, you are great person.

I guess you are sitting there all day and just helping others. Great person
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Haha... thanks, you make me blush
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date and Time Spinner