tamble / jquery-ui-daterangepicker

A JQuery UI based date range picker.
MIT License
184 stars 108 forks source link

Start date of week is Monday #3

Closed Mel04 closed 9 years ago

Mel04 commented 9 years ago

Is it possible to change the start date of the week from Sunday to Monday? Because the option "last 7 days" selects the week from Monday till Sunday and the week is from Monday till Sunday in many countries, too.

ghola commented 9 years ago

Since the daterangepicker is based on the jQuery UI Datepicker, any option that you can use with the datepicker, you can with the daterangepicker too.

Here you can find how to set the start of week for the datepicker: http://stackoverflow.com/questions/1313317/set-start-day-of-the-week-in-jquery-ui-datepicker

You can pass options to the underlaying datepicker using the datepickerOptions option, like in the "Multiple Months" example found here: http://tamble.github.io/jquery-ui-daterangepicker/

If for some reason the above is not enough and you need to further customize the date ranges, you can always do it by following the "Custom Preset Ranges" example found here: http://tamble.github.io/jquery-ui-daterangepicker/