Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date and Time Spinner

 
ibrahim yener
Ranch Hand
Posts: 202
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
ibrahim yener
Ranch Hand
Posts: 202
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve, you are great person.

I guess you are sitting there all day and just helping others. Great person
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Haha... thanks, you make me blush
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic