mirror of
https://github.com/Growstuff/growstuff.git
synced 2025-12-24 01:57:46 -05:00
Swap harvest to html5 date field (#3894)
* Update gardens to have a non 0 area * Spec no longer possible through frontend * Fix spec * Swap harvest to html5 date field * Fix spec
This commit is contained in:
@@ -30,8 +30,7 @@
|
||||
= link_to "Request new crops.", new_crop_path
|
||||
|
||||
.col-md-4
|
||||
= f.text_field :harvested_at, value: @harvest.harvested_at ? @harvest.harvested_at.to_fs(:ymd) : '',
|
||||
class: 'add-datepicker', label: 'When?'
|
||||
= f.date_field :harvested_at, value: @harvest.harvested_at ? @harvest.harvested_at.to_fs(:ymd) : '', label: 'When?'
|
||||
.col-12
|
||||
= f.form_group :plant_part_id, label: { text: "Harvested Plant Part" } do
|
||||
.row
|
||||
|
||||
@@ -26,7 +26,7 @@ describe "Harvesting a crop", :js, :search do
|
||||
|
||||
within "form#new_harvest" do
|
||||
choose plant_part.name
|
||||
fill_in "When?", with: "2014-06-15"
|
||||
fill_in "When?", with: Time.new(2014, 06, 15)
|
||||
fill_in "How many?", with: 42
|
||||
fill_in "Weighing (in total)", with: 42
|
||||
fill_in "Notes", with: "It's killer."
|
||||
|
||||
Reference in New Issue
Block a user