Created
June 7, 2016 09:05
-
-
Save aj07/54db84129929577fde58f23c2c282441 to your computer and use it in GitHub Desktop.
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
<div class="form-group"> | |
<%= f.label :from_date, "From Date", :class => 'control-label col-md-2' %> | |
<div class="col-md-10"> | |
<%= f.text_field :from_date, :class => 'form-control date', :placeholder => "Start Date", :value => "#{ f.object.from_date.nil? ? " " : f.object.from_date.now.strftime("%m/%d/%Y")}" %> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here expiration_date is the date field , so check with debugger weather you are getting date on it or not if you are getting that then check this condition, it should work but how you have implemented it is looking like you are checking wrong attribute. As I can see you don't have date field with the name of expiration_date.