AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

HTML renderer doesn't set default value of date input

Open dsanvita opened this issue 9 years ago • 1 comments

Input.Date schema has a value property to set the default value, but this is not implemented in the HTML renderer.

This was my temporary fix:

AdaptiveCards.DateInput.prototype.internalRender = (() => {
	let original = AdaptiveCards.DateInput.prototype.internalRender;
	return function() {
		var element = original.call(this);
		if (this.defaultValue) {
			element.value = this.defaultValue;
		}
		return element;
	};
})();

html date inputs seem to accept values of the form 'YYYY-MM-DD' as strings, so as long as the value is of that format, it works.

https://github.com/Microsoft/AdaptiveCards/pull/343

dsanvita avatar May 17 '17 05:05 dsanvita

Can't repro, I must have fixed this a while back.

dclaux avatar Apr 19 '19 17:04 dclaux