Skip to content

Proxy/adapter state pattern (mutable $derived) #14686

Answered by ryanatkn
arinmirza asked this question in Q&A
Discussion options

You must be logged in to vote

The recently-added function bindings for bind: allow you to use $derived to create the Date from the string, and write to the string from the binding:

playground

<DatePicker bind:value={() => date_object, (v) => date = v.toString()} />

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@arinmirza
Comment options

Answer selected by arinmirza
Comment options

You must be logged in to vote
1 reply
@arinmirza
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants