-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to provide default start/end date for date range
- Loading branch information
Roman Kushnir
committed
Jan 6, 2016
1 parent
0b0aeea
commit cb1c5cf
Showing
6 changed files
with
40 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
= bootstrap_form_for :fox do |form| | ||
= ui_component(:date_range, form: form, name: 'report_range') | ||
= bootstrap_form_for :my_form do |form| | ||
= ui_component(:date_range, form: form, name: 'my_date_range') |
4 changes: 2 additions & 2 deletions
4
spec/dummy/app/views/components/date_range_custom_ranges.slim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
= bootstrap_form_for :fox do |form| | ||
= bootstrap_form_for :my_form do |form| | ||
= ui_component(:date_range, | ||
form: form, | ||
name: 'report_range', | ||
name: 'my_date_range', | ||
ranges: { 'Next 10 days' => [Date.new(2015, 6, 22), Date.new(2015, 7, 1)] }) |
6 changes: 6 additions & 0 deletions
6
spec/dummy/app/views/components/date_range_start_end_date.html.slim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
= bootstrap_form_for(:my_form, url: '/') do |f| | ||
= ui_component 'date_range', form: f, | ||
name: 'my_date_range', | ||
date_limit: { days: 7 }, | ||
start_date: Date.new(2016, 1, 1), | ||
end_date: Date.new(2016, 1, 21) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters