Commits

Dan Ross committed d4a6f27

setting all of default due date to today

Comments (0)

Files changed (2)

 
 get("/") do
   @current_month = Date::MONTHNAMES[Time.now.month]
+  @current_day = Time.now.day
+  @current_year = Time.now.year
   @years = Array.new
   @tasks = Task.all
   @months = Date::MONTHNAMES
           %option=month
             
           
-      %select{:name => 'due_date_day'}
+      %select{:name => 'due_date_day', :id => 'day'}
         - (1..31).each do |day|
           %option= day
         
-      %select{:name => 'due_date_year'}
+      %select{:name => 'due_date_year', :id => 'year'}
         -@years.each do |year|
           %option= year
                 
 
 :javascript
   $("#month").val("#{@current_month}").attr("selected", "selected");
-
+  $("#day").val("#{@current_day}").attr("selected", "selected");
+  $("#year").val("#{@current_year}").attr("selected", "selected");
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.