This is using the html5 date picker. Just that picker is good enough for
mobile but inadequate for web.


On Mon, Feb 24, 2014 at 4:59 PM, alxdarksage <notifications@github.com>wrote:

> In src/main/webapp/WEB-INF/tags/forms/date.tag:
>
> > +			$(".date-picker-today").val(new Date().toJSON().slice(0,10));
> > +			$(".date-set").click( function(event) {
> > +				var date = new Date();
> > +				if ( $(event.target).hasClass("last-week") ) {
> > +					date = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);
> > +				} else if ( $(event.target).hasClass("last-month") ) {
> > +					date = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000);
> > +				}
> > +				$(event.target).parent().find("input").val(date.toJSON().slice(0,10));
> > +			});
> > +		});
> > +		function resetDateToToday(element){
> > +			element.val(new Date().toJSON().slice(0,10));
> > +		}
> > +	</script>
> > +</sage:jsonce>
>
> Why are you not using the HTML5 date picker for this and letting the
> polyfill do it's thing? Just from looking over your shoulder, they were not
> very different.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/Sage-Bionetworks/Bridge/pull/94/files#r10019900>
> .
>