{"id":13518487,"url":"https://github.com/gregschmit/recurring_select","last_synced_at":"2025-10-24T00:24:15.318Z","repository":{"id":1924778,"uuid":"2852971","full_name":"gregschmit/recurring_select","owner":"gregschmit","description":"A gem for adding selectors for setting recurring events.","archived":false,"fork":false,"pushed_at":"2024-09-09T17:07:58.000Z","size":667,"stargazers_count":330,"open_issues_count":43,"forks_count":237,"subscribers_count":66,"default_branch":"master","last_synced_at":"2024-09-09T21:17:22.885Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregschmit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-11-25T22:36:06.000Z","updated_at":"2024-09-09T17:08:02.000Z","dependencies_parsed_at":"2023-02-18T19:16:00.810Z","dependency_job_id":"dc97691a-a2ea-4628-9ad3-817a8a70124b","html_url":"https://github.com/gregschmit/recurring_select","commit_stats":{"total_commits":222,"total_committers":36,"mean_commits":6.166666666666667,"dds":0.5585585585585586,"last_synced_commit":"a3b40076d9fef77f88b4b70b8048eb9b5df92e70"},"previous_names":["getjobber/recurring_select"],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregschmit%2Frecurring_select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregschmit%2Frecurring_select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregschmit%2Frecurring_select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregschmit%2Frecurring_select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregschmit","download_url":"https://codeload.github.com/gregschmit/recurring_select/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247666008,"owners_count":20975787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T05:01:45.393Z","updated_at":"2025-10-24T00:24:15.312Z","avatar_url":"https://github.com/gregschmit.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Recurring Select\n\n[![Build Status](https://travis-ci.org/gregschmit/recurring_select.svg?branch=master)](https://travis-ci.org/GetJobber/recurring_select) [![Code Climate](https://codeclimate.com/github/gregschmit/recurring_select.png)](https://codeclimate.com/github/gregschmit/recurring_select)\n\nThis gem adds selectors and helpers for working with recurring schedules in a Rails app. It uses [ice_cube](https://github.com/seejohnrun/ice_cube) recurring scheduling gem.\n\nCreated by the [Jobber](http://getjobber.com) team for Jobber, the leading business management tool for field service companies.\n\nCheck out the [live demo](http://recurring-select-demo.herokuapp.com/) (code in [spec/dummy](https://github.com/GetJobber/recurring_select/tree/master/spec/dummy) folder).\n\n\n## Usage\n\nBasic selector:\n\nAdd the gem to your Gemfile:\n\n```ruby\ngem 'recurring_select'\n```\n\n### Require Assets\n\n#### Desktop Interface:\n- application.js: `//= require recurring_select`\n- application.css: `//= require recurring_select`\n\n#### jQuery Mobile Interface:\n- application.js: `//= require jquery`\n- application.js: `//= require jquery-mobile-rs`\n- application.css: `//= require jquery-mobile-rs`\n\n### Form Helper\n\nIn the form view call the helper:\n\n```erb\n\u003c%= f.select_recurring :recurring_rule_column %\u003e\n```\n\n#### Options\n\n```ruby\nf.select_recurring :current_existing_rule, [\n  IceCube::Rule.weekly.day(:monday, :wednesday, :friday),\n  IceCube::Rule.monthly.day_of_month(-1)\n]\n```\n\nUse :allow_blank for a \"not recurring\" option:\n\n```ruby\n  f.select_recurring :current_existing_rule, nil, :allow_blank =\u003e true\n```\n\n\n### Additional Helpers\n\nRecurring Select also comes with helpers for parsing the\nparameters when they hit your application.\n\nYou can send the column into the `is_valid_rule?` method to check the\nvalidity of the input.\n\n```ruby\nRecurringSelect.is_valid_rule?(possible_rule)\n```\n\nThere is also a `dirty_hash_to_rule` method for sanitizing the inputs\nfor IceCube. This is sometimes needed if you're receiving strings, fixed\nnumbers, strings vs symbols, etc.\n\n```ruby\nRecurringSelect.dirty_hash_to_rule(params)\n```\n\n### I18n\n\nRecurring Select is I18n aware\n\nYou can create a locale file like this:\n\n```yaml\nen:\n  recurring_select:\n    not_recurring: \"- not recurring -\"\n    change_schedule: \"Change schedule...\"\n    set_schedule: \"Set schedule...\"\n    new_custom_schedule: \"New custom schedule...\"\n    custom_schedule: \"Custom schedule...\"\n    or: or\n```\n\nYou have to translate JavaScript texts too by including the locale file in your assets manifest. Only French and English are supported for the moment.\n\n```\n//= require recurring_select/en\n//= require recurring_select/fr\n```\n\nFor other languages include a JavaScript file like this:\n\n```js\nRecurringSelectDialog.config.texts = {\n  locale_iso_code: \"fr\"\n  repeat: \"Repeat\"\n  frequency: \"Frequency\"\n  daily: \"Daily\"\n  weekly: \"Weekly\"\n  monthly: \"Monthly\"\n  yearly: \"Yearly\"\n  every: \"Every\"\n  days: \"day(s)\"\n  weeks_on: \"week(s) on\"\n  months: \"month(s)\"\n  years: \"year(s)\"\n  first_day_of_week: 1\n  day_of_month: \"Day of month\"\n  day_of_week: \"Day of week\"\n  cancel: \"Cancel\"\n  ok: \"OK\"\n  days_first_letter: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"]\n  order: [\"1st\", \"2nd\", \"3rd\", \"4th\", \"5th\", \"Last\"]\n}\n```\n\nOptions include:\n\n```js\nRecurringSelectDialog.config.options = {\n  monthly: {\n    show_week: [true, true, true, true, false, false] //display week 1, 2 .... Last\n  }\n}\n```\n\n## Testing and Development\n\nStart the dummy server for clicking around the interface:\n\n```console\nrails s\n```\n\nTests can be ran against different versions of Rails like so:\n\n```\nBUNDLE_GEMFILE=spec/gemfiles/rails-7 bundle install\nBUNDLE_GEMFILE=spec/gemfiles/rails-7 bundle exec rspec spec\n```\n\nFeel free to open issues or send pull requests.\n\n## Licensing\n\nThis project rocks and uses the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregschmit%2Frecurring_select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregschmit%2Frecurring_select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregschmit%2Frecurring_select/lists"}