0

I'm using recurring_select gem in my Rails project but can't find a way to specify week_start param, so that Monday would appear first while choosing the weekly schedule. Is there a way to do this?

Here's the source code of gem https://github.com/GetJobber/recurring_select

Here's what the schedule picker currently looks like:

enter image description here

And here's the resulting code of recurring column:

{:validations=>{:day=>[1, 5]}, :rule_type=>"IceCube::WeeklyRule", :interval=>1, :week_start=>0}

I wouldn't like to override this in my controller, I'm sure there's a way to specify this as a param in a view or sth like that, but my frontend skills are too low to understand this. I've tried passing week_start: 1 as a form helper param, but this did not help

Marat
  • 622
  • 7
  • 21

1 Answers1

0

The documentation is not entirely clear, and the location of the option is not entirely logical, but according to the source, I am guessing you have to define the first_day_of_week which for some reason is located inside the texts configuration block. So something like

$.fn.recurring_select.texts = {
  first_day_of_week: 1
}

Not sure how the number is interpreted, 1 is monday and 0 is sunday?

nathanvda
  • 49,707
  • 13
  • 117
  • 139