Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only change date to beginning of month if it isn't nil.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7027 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 1ddaec1e68ae35509d665dbfc5d7f9ae87f41962 1 parent 5945816
@jeremy jeremy authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/helpers/date_helper.rb
View
2  actionpack/lib/action_view/helpers/date_helper.rb
@@ -389,7 +389,7 @@ def date_or_time_select(options)
# If the day is hidden and the month is visible, the day should be set to the 1st so all month choices are valid
# (otherwise it could be 31 and february wouldn't be a valid date)
- if discard[:day] && !discard[:month]
+ if datetime && discard[:day] && !discard[:month]
datetime = datetime.change(:day => 1)
end
Please sign in to comment.
Something went wrong with that request. Please try again.