Reply to Re: select data in drop-down box

Your name:

Reply:


Posted by kirke on 10/19/06 04:22

assume that I know the start and end date already.
Then How can I generate dates between two dates?


Rik wrote:
> kirke wrote:
> > I have a two text box and one select box.
> >
> > two text box will be filled with date values. (in the form of
> > dd-mm-year)
> > First text box is called "start date"
> > Second is "end date"
> >
> > Thus, I want to put dates between "start date" and "end date" in
> > select box.
> >
> > Is there any way to put automatically in option field?
> > My idea is, first calculate the date difference
> > and then, add date till startdate + difference.
>
> It is possible with PHP when that 'start' date and the 'end' date are known
> BEFORE the user requests that page. Simply generate all possible dates
> between those two values, and commit them to select boxes. If they're not
> known, or they cross month or year barriers, you'll have to rely on
> javascript to limit the options (and make unlimited options available
> without javascript, on a date outside the possibilities you will produce an
> error on submitting).
>
> Ofcourse, on submitting, whether javascript is enabled or not, you'll
> always have to check start, interim, and end date on submitting to make
> sure it's valid.
>
> On HOW to make a date confirm by js, I'd suggest a trip to
> comp.lang.javascript.
>
> --
> Grtz,
>
> Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация