Open sinistra opened 4 years ago
Hi, this seems to work for me:
/// App.svelte
<script lang="ts">
import Dialog_ from 'smelte/src/components/Dialog';
import { Button, DatePicker } from 'smelte/src';
export let name: string;
let value=false
</script>
<main>
<Button on:click={()=>{value=true}}>Open Dialog</Button>
<Dialog_ bind:value persistent>
<DatePicker/>
<div slot="actions">
<Button on:click={()=>{value=false}}>Close</Button>
</div>
</Dialog_>
</main>
Could you share some example code?
I ended up writing my own datePicker, but I suspect the problem is a submit that is propagating up from the datePicker thru the modal.
just in case ->
if you overwrite the whitelistPatterns
parameter, ensure you did not remove accidentally the date picker part.
The original whitelistPatterns
parameter is as follows:
const defaultWhitelistPatterns = [
// for JS ripple
/ripple/,
// date picker
/w\-.\/7/
];```
Additionally, there seems to be no way of automatically opening datePicker when Dialog that contains it opened.
I am using the datepicker inside a modal form. When the calendar widget is displayed and the user clicks on either '<' or '>' (previous/next month) the datepicker and the parent modal are closed. btw, the modal has 'persistent' set, so it should not close.
Has anyone experienced this or can provide any advice on how to manage it?