JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://googledrive.com/host/0By6fcuKzPfO3V2ktVGN2MlBSX3M/js/bootstrap-datepicker.js"></script>
<link rel="stylesheet" href="https://googledrive.com/host/0By6fcuKzPfO3V2ktVGN2MlBSX3M/css/datepicker.css">
<input type="text" class="span2" value="12/12/2013" id="dp">

CSS

@import url("http://getbootstrap.com/2.3.2/assets/css/bootstrap.css");

CoffeeScript

$("#dp").datepicker()
$("#dp").on "keyup", (e) ->
  value = e.target.value
  if value.search(/(.*)\/(.*)\/(.*)/) != -1
    date = e.target.value.split("/")
    month = date[0]
    day = date[1]
    year = date[2]      
    year = "0" if year == ""
    if year.length < 4
      newYear = String(2000 + parseInt(year))
      $(@).datepicker("setValue", "#{month}/#{day}/#{newYear}")
      year = "" if year == "0"
      $(@).val("#{month}/#{day}/#{year}")