Commit 461608e1 authored by Phil Hughes's avatar Phil Hughes Committed by Robert Speicher

replace hyphens to commas when converting date

parent 4eeef198
...@@ -26,8 +26,7 @@ class @DueDateSelect ...@@ -26,8 +26,7 @@ class @DueDateSelect
addDueDate = -> addDueDate = ->
# Create the post date # Create the post date
value = $("input[name='#{fieldName}']").val() value = $("input[name='#{fieldName}']").val()
valueSplit = value.split '-' date = new Date value.replace(new RegExp('-', 'g'), ',')
date = new Date(valueSplit[0], parseInt(valueSplit[1]) - 1, valueSplit[2])
mediumDate = $.datepicker.formatDate 'M d, yy', date mediumDate = $.datepicker.formatDate 'M d, yy', date
data = {} data = {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment