JRS: In article <11**********************@z14g2000cwz.googlegroups .com>
, dated Wed, 25 May 2005 07:17:57, seen in news:comp.lang.javascript,
jo******@canada.com posted :
I want to popup a calendar (which is not difficult to many developer),
but the difficulty to me is, how to make the user select only on a
particular period, like he/she can only select a date from today to the
date of (today + 10).
Perhaps I don't get your meaning?
Just check, when the selection is made, that it's in the right range,
and either proceed or ask for another attempt.
You can either so the calculation in terms of day-of-month number, in
which case you may need the number of days in the previous month; or in
terms of absolute day number. Don't forget Summer Time effects.
But if the period is always within about 20 days, you could offer a
select list for the allowable days.
Or you could ask how many days (1 to 10) ahead of today to use, and then
display the implied date.
See below.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.