(function() {

  // Methods used in datetime parsing and setting.
  function parseDate(dateString) {
    var matches = dateString.match(/(\d+).(\d+).(\d+)/i);
    if (matches == null || matches.length < 4) {
      return null;
    } else {
      var m = moment();
      m.utc().year(matches[1]);
      m.utc().month(matches[2]);
      m.utc().date(matches[3]);
      return m;
    }
  }

  function setInputDate(newMoment, hiddenInput) {
    if (newMoment == null || !newMoment.isValid()) {
      hiddenInput.val("");
      return null;
    }

    var curMoment = moment(hiddenInput.val());
    if (!curMoment.isValid()) {
      curMoment = newMoment;
    } else {
      curMoment.utc().year(newMoment.utc().year());
      curMoment.utc().month(newMoment.utc().month());
      curMoment.utc().date(newMoment.utc().date());
    }
    hiddenInput.val(curMoment.utc().format());
    return curMoment;
  }

  function parseTime(timeString) {
    var matches = timeString.match(/(\d+)(?::(\d\d))?\s*(p?)/i);
    if (matches == null || matches.length < 4) {
      return null;
    } else {
      var m = moment();

      var h = parseInt(matches[1]);
      if (h == 12 && !matches[3]) {
        h = 0
      } else if (matches[3]) {
        h += (h < 12) ? 12 : 0;
      }
      m.utc().hour(h);
      m.utc().minute(matches[2]);
      return m;
    }
  }

  function setInputTime(newMoment, hiddenInput) {
    if (newMoment == null || !newMoment.isValid()) {
      hiddenInput.val("");
      return null;
    }

    var curMoment = moment(hiddenInput.val());
    if (!curMoment.isValid()) {
      curMoment = newMoment;
    } else {
      curMoment.utc().hour(newMoment.utc().hour());
      curMoment.utc().minute(newMoment.utc().minute());
    }
    hiddenInput.val(curMoment.utc().format());
    return curMoment;
  }






  // Initializing the attribute view.
  var init = function(formId) {
    var dtSection = $("." + formId + ".datetime-attribute");
    var hiddenInput = dtSection.find("input#" + formId + "[type=hidden]");
    var dateInput = dtSection.find("#" + formId + "-date");
    var timeInput = dtSection.find("#" + formId + "-time");

    var dtMoment = moment(hiddenInput.val());
    if (hiddenInput.val() == "") {
      dtMoment = null;
    }

    var handleDateSelect = function() {
      var newDateMoment = parseDate(dateInput.val());
      setInputDate(newDateMoment, hiddenInput);
      return newDateMoment;
    }

    var handleTimeSelect = function() {
      var newTimeMoment = parseTime(timeInput.val());
      setInputTime(newTimeMoment, hiddenInput);
      return newTimeMoment;
    }

    // Create Date Picker
    var datePicker = new Pikaday({ field: $("#" + formId + "-date")[0], onSelect: handleDateSelect });

    // Create Time Picker
    $("#" + formId + "-time").clockpicker({
      autoclose: true,
      donetext: "Done",
      twelvehour: true,
      afterDone: handleTimeSelect,
    });

    if (dtMoment != null) {
      timeInput.val(dtMoment.utc().format("hh:mmA"));
    }

    dtSection.closest("form").submit(function(event) {
      event.preventDefault();

      // Only date is *required* so the order here is important.
      handleTimeSelect();
      handleDateSelect();

      event.target.submit();
    });
  }


  if (window.Upmin == null) {
    window.Upmin = {};
  }
  if (window.Upmin.Attributes == null) {
    window.Upmin.Attributes = {};
  }
  window.Upmin.Attributes.DateTime = init;
})();

@@ -1808,21 +1808,16 @@
 t;%0A  %7D%0A%0A
-%0A%0A%0A%0A%0A
   // Ini
@@ -1830,16 +1830,25 @@
 ing the 
+DateTime 
 attribut
@@ -1865,16 +1865,24 @@
 var init
+DateTime
  = funct
@@ -3267,16 +3267,998 @@
 );%0A  %7D%0A%0A
+    // Initializing the Date attribute view.%0A    // TODO: Dry this up against DateTime%0A    var initDate = function(formId) %7B%0A        var dtSection = $(%22.%22 + formId + %22.date-attribute%22);%0A        var hiddenInput = dtSection.find(%22input#%22 + formId + %22%5Btype=hidden%5D%22);%0A        var dateInput = dtSection.find(%22#%22 + formId + %22-date%22);%0A%0A        var dtMoment = moment(hiddenInput.val());%0A        if (hiddenInput.val() == %22%22) %7B%0A            dtMoment = null;%0A        %7D%0A%0A        var handleDateSelect = function() %7B%0A            var newDateMoment = parseDate(dateInput.val());%0A            setInputDate(newDateMoment, hiddenInput);%0A            return newDateMoment;%0A        %7D%0A%0A        // Create Date Picker%0A        var datePicker = new Pikaday(%7B field: $(%22#%22 + formId + %22-date%22)%5B0%5D, onSelect: handleDateSelect %7D);%0A%0A        dtSection.closest(%22form%22).submit(function(event) %7B%0A            event.preventDefault();%0A%0A            handleDateSelect();%0A%0A            event.target.submit();%0A        %7D);%0A    %7D%0A
 %0A  if (w
@@ -4386,16 +4386,17 @@
 %7B%7D;%0A  %7D%0A
+%0A
   window
@@ -4428,16 +4428,67 @@
 e = init
+DateTime;%0A  window.Upmin.Attributes.Date = initDate
 ;%0A%7D)();%0A

Add Date only initializer