datetimepicker fix

This commit is contained in:
Andreas Stephanides
2014-09-14 12:37:23 +02:00
parent c929025cb6
commit 30a80edb3d
3 changed files with 12 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
$ ->
`$('.datetimepicker').datetimepicker({format: 'd.m.Y H:i', startDate: (!($(this).attr("value")==undefined))? $(this).attr("value"): '' })`
return

View File

@@ -1,5 +1,7 @@
<p>
<b>Geburtstag</b> <%= I18n.l(interninfo.birthday,format: :short) unless interninfo.birthday.nil?%>
<% unless interninfo.birthday.nil? %>
<b>Geburtstag</b> <%= I18n.l(interninfo.birthday,format: :short) %>
<% end %>
</p>
<p>
<b>Adresse:</b>

View File

@@ -36,5 +36,7 @@
<script>
$(document).ready(function(){
$('.datetimepicker').map($(this).datetimepicker({format: 'd.m.Y H:i', startDate: (!($(this).attr("value")==undefined))? $(this).attr("value"): ""}))
})</script>
})
$(document).ready(function(){$('.datetimepicker').datetimepicker({format: 'd.m.Y H:i', startDate: (!($(this).attr("value")==undefined))? $(this).attr("value"): ""})})
</script>
<%= tinymce %>