-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: impl datetime dropdown #74
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,32 @@ | |
|
||
export let systemConfiguration: Writable<SystemConfiguration> | ||
console.log({systemConfiguration}) | ||
|
||
let dateFormatObj = [ | ||
{ key: "ddd MMM DD HH:mm:ss Z YYYY", value:"ddd MMM DD HH:mm:ss Z YYYY (Sun Jan 22 23:04:05 -0000 2006)"}, | ||
{ key: "MMMM DD YYYY HH:mm:ss", value: "MMMM DD YYYY HH:mm:ss (January 22 2006 23:04:05)" }, | ||
{ key: "MMMM DD YYYY", value:"MMMM DD YYYY (January 22 2006)" }, | ||
{ key: "YYYY-MM-DDTHH:mm:ssZ", value: "YYYY-MM-DDTHH:mm:ssZ (2006-01-22T23:04:05-0000)" }, | ||
{ key: "YYYY-MM-DD HH:mm:ss Z", value: "YYYY-MM-DD HH:mm:ss Z (2006-01-22 23:04:05 -0000)" }, | ||
{ key: "YYYY-MM-DD", value: "YYYY-MM-DD (2006-01-22)" }, | ||
{ key: "MM/DD/YYYY", value: "MM/DD/YYYY (01/22/2006)" }, | ||
{ key: "MM/DD/YY", value: "MM/DD/YY (01/22/06)" }, | ||
{ key: "DD-MM-YYYY", value: "DD-MM-YYYY (22-01-2006)" }, | ||
{ key: "DD/MM/YYYY", value: "DD/MM/YYYY (22/01/2006)" }, | ||
{ key: "DD/MM/YY", value: "DD/MM/YY (22/01/06)" }, | ||
{ key: "X", value: "X (1137971045)" } | ||
] | ||
|
||
</script> | ||
<label>Date format:</label> | ||
<input type="text" class="input input-bordered w-full max-w-xs" | ||
bind:value={$systemConfiguration.slotConfiguration[datePropertyType.value].configuration.dateFormat}/> | ||
|
||
<label class="label" for="date-format-selector">Date format selector</label> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're getting better with svelte :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you 😄 |
||
<!-- Dropdown list date format types --> | ||
<div class="mb-8" id="date-format-selector"> | ||
<select data-choose-data class="select select-bordered select-primary w-full max-w-3xl text-xl" | ||
bind:value={$systemConfiguration.slotConfiguration[datePropertyType.value].configuration.dateFormat}> | ||
<option disabled selected>Select default Date Format</option> | ||
{#each dateFormatObj as dateFormat} | ||
<option value={dateFormat.key}>{dateFormat.value}</option> | ||
{/each} | ||
</select> | ||
</div> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great that we are making a drop down. But is this too complicated? Check what Airtable does . 5 or 6 simple options, with a live example so you can see what it looks like.
Also, the current date in cozemble does not support time. My thinking so far was to model time as its own type....but not sure if that is a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss this, I'm willing to make adjustments.