adrienpoly / stimulus-flatpickr

A modest, yet powerful wrapper of Flatpickr 📆 for Stimulus
MIT License
415 stars 30 forks source link

[new]: adds a new option to enable/disable days of week #23

Closed adrienpoly closed 6 years ago

adrienpoly commented 6 years ago
<%= form_with model: Appointement.new, authenticity_token: true do |f| %>
  <%= f.text_field :start_time,
    data: {
      controller: "flatpickr",
      flatpickr_disable_days_of_week: [5,6], #disables saturdays and sundays 
      flatpickr_min_date: Time.zone.now #disables past dates
    } %>
<% end %>

or the opposite behavior using flatpickr_enable_days_of_week

resolves #21

codecov[bot] commented 6 years ago

Codecov Report

Merging #23 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #23   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           6      6           
  Lines          45     60   +15     
=====================================
+ Hits           45     60   +15
Impacted Files Coverage Δ
src/config_options.js 100% <100%> (ø) :arrow_up:
src/stimulus-flatpickr.js 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 114b41f...744cbeb. Read the comment docs.