class ActionView::Helpers::DateTimeSelector

def set_day_if_discarded

valid. Otherwise, February 31st or February 29th, 2011 can be selected, which are invalid.
If the day is hidden, the day should be set to the 1st so all month and year choices are
def set_day_if_discarded
  if @datetime && @options[:discard_day]
    @datetime = @datetime.change(day: 1)
  end
end