December 30th, 2012, 07:20 AM
Month drop-down, multi-year?
Howdy y'all. I guess I'm just looking for some thought/ideas on how to go about this. When I originally wrote this script, I have the month drop-down to pick what bills to see. I wasn't thinking of how to manage things come a new year.
Two ideas I have is make a second drop-down hold the year, or allow the single drop-down to hold items similar to Month - Year. I don't intend on holding a long history, and will probably edit the script to expire/remove items after 1 years time.
Just lookin' for peoples thoughts/input on what I should end up doing. Thanks in advance.
December 30th, 2012, 08:28 AM
Both sound reasonable, and as for which it depends on how you're using the dropdown(s). Still not quite sure about that.
If the list is chronological then "Month - Year" would make sense: down the list is going one way in time, up the list is going the other way. It's putting two pieces of information in one field, generally a no-no, but I think it's fine for this.
If the list is like a filter then one for year and one for month makes more sense: you're not so much scrolling through time as it is you're picking a specific month to look at. Makes the programming easier too.
December 30th, 2012, 01:08 PM
Mostly referenced to view current months bills, but I figured since I'd be storing via a database, then might as well offer history browsing.
I'm thinking, since most bills are exactly the same every month, to create an if/then that will execute first time page is viewed each month to remove all bills from that month the previous year, and create the current months initials bills. This way nothing should overlap, and upon page arrival, the user is always arriving at current month.
One other thing I'd have to figure out would be changing it so January comes AFTER December on the drop-down list so months are accurate in that manner. It won't matter ASC/DESC.
Example: (Current date being August 20, 2013)
September - 2012
October - 2012
November - 2012
December - 2012
January - 2013
February - 2013
March - 2013
April - 2013
May - 2013
June - 2013
July - 2013
August - 2013
I'm hoping it would just be a simple edit in that loop creating the drop-down options. *crosses fingers* ^_^