[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Suggestions for a date picker that supports mm/yyyy

Jason Vogel

12/11/2006 11:27:00 PM

Does anyone have some suggestions for a date picker that supports
mm/yyyy.

Also, does anyone know the "best" way to validate a mm/yyyy as "valid"?
Meaning this month or the future?

Thanks,
Jason

1 Answer

Paul Lutus

12/11/2006 11:36:00 PM

0

Jason Vogel wrote:

> Does anyone have some suggestions for a date picker that supports
> mm/yyyy.

Do you mean a GUI component?

> Also, does anyone know the "best" way to validate a mm/yyyy as "valid"?
> Meaning this month or the future?

Test the entered month and year to see if they are >= the present month and
year? You cold do this by adding the present year * 12 to the present
month, this gives you an easily compared integer with units of months. Do
the same to the user's entry and there you are.

If you include days and require the resolution of days, things become more
complicated, but for the case of month and year, it is rather easy.

--
Paul Lutus
http://www.ara...