Month and Year Sort Order

Discussion in 'JavaScript' started by aboo88, Apr 29, 2010.

  1. #1
    I am trying to present users with a listbox to select month and year for the last 12 months.

    The default load order is:

    Jan 2010
    Feb 2010
    Mar 2010
    Apr 2010
    May 2009
    Jun 2009

    Ideally, I would like to present the list as follows:

    Current month - Year
    Previous Month - Year
    etc, etc for the last 12 months

    Can anyone provide a sample code that does that?
     
    aboo88, Apr 29, 2010 IP