'use strict'; var Curry = require("bs-platform/lib/js/curry.js"); var React = require("react"); var Moment = require("moment"); function DatePicker(Props) { var currentDate = Props.currentDate; var updateDate = Props.updateDate; var handleChange = function ($$event) { var value = Moment($$event.target.value, "YYYY-MM-DD"); console.log("Updating date to " + String(value)); return Curry._1(updateDate, /* ChangeDate */{ _0: value }); }; return React.createElement(React.Fragment, undefined, React.createElement("input", { type: "date", value: currentDate.format("YYYY-MM-DD"), onChange: handleChange })); } var make = DatePicker; exports.make = make; /* react Not a pure module */