acidb/mobiscroll — pull request #4 by malandrew (2011-11-18 00:39:58+00:00)
Title: 'day' and 'daytime' presets

acidb, dioslaska,

How's it going?

I have two new presets I created that may or may not be interesting for you guys. They are 'day' and 'daytime'.

'day' basically lets you select a date up to X days in the future, where X is determined by the s.daytimeLength option. 'daytime' is the same wheel option, but lets you set a time as well.

If the currently set datetime of the widget exceeds s.daytimeLength, it will default to the "datetime" preset.

Ultimately, my idea is to move this towards a simple relative interface for dates up to X days in the future.

On top of those modifications, I also made it possible to turn "labels" on/off and also make it so the wheels are always connected with no gap.

Let me know what you think of these modifications and if they are of interest to the project.

Best,
Andrew

PS - What would be great would be a "module" system in Mobiscroll that separates the scroller logic from the presets and associated functions (e.g. getDate, parseDate, etc.). This would make it easy for the community to add new custom modules such as these two I created or other presets such as State or Country selectors and whatnot. It would also allow people to keep the code they serve to the client lean since they would only need to include the modules they are using.