Add datepicked data binding and fix mustache rendering for non string values

This commit is contained in:
Andrew Kingston 2020-11-24 11:13:26 +00:00
parent be4106eae4
commit def6054b26
2 changed files with 7 additions and 2 deletions

View File

@ -8,6 +8,9 @@ const entityMap = {
">": ">",
}
mustache.escape = text => {
if (text == null || typeof text !== "string") {
return text
}
return text.replace(/[<>]/g, function fromEntityMap(s) {
return entityMap[s] || s
})

View File

@ -2,11 +2,13 @@
import { DatePicker } from "@budibase/bbui"
import { getContext } from "svelte"
const { styleable } = getContext("sdk")
const { styleable, setBindableValue } = getContext("sdk")
const component = getContext("component")
export let placeholder
export let value
let value
$: setBindableValue(value, $component.id)
function handleChange(event) {
const [fullDate] = event.detail