rfcx / arbimon

Ecoacoustic analysis platform empowering conservationists to analyze acoustic data and to derive insights about the ecosystem at scale
https://arbimon.org
Apache License 2.0
4 stars 1 forks source link

CNN Create - date picker with the recording information #1573

Open naluinui opened 7 months ago

naluinui commented 7 months ago

Design: https://www.figma.com/file/FGnP9kAFLDmraAFJf8OBAG/CNN-Roadmap?type=design&node-id=654-12690&mode=design&t=qAwDQ2uFkOwcjLqv-4

  1. Default calendar (no selected date)

Image

  1. Selected date style

Image

Date picker style https://ui.shadcn.com/docs/components/date-picker

Expected outcome

Related Tasks

grindarius commented 6 months ago

Have we got API task for this?

naluinui commented 6 months ago

@grindarius yes, #1574

naluinui commented 5 months ago

Vue

antonyharfield commented 5 months ago

Try this: https://easepick.com/examples/days-with-prices.html

antonyharfield commented 5 months ago

You can use Flowbite datepicker and pass in options:

import DateRangePicker from 'flowbite-datepicker/DateRangePicker'

const beforeShowDay = (date) => {
  const day = date.getDate()
  return { content: `<span>${day}</span><br><span style="font-size:8px">test</span>` }
}
const dateRangePickerEl = document.getElementById('dateRangePickerId')
new DateRangePicker(datepickerEl, {
    // options
    beforeShowDay
})

Ref: https://github.com/themesberg/flowbite-datepicker/blob/658b8cc5b84aec732e60f59044b35d4769c00294/demo/live-demo.js#L22

antonyharfield commented 4 months ago

Flowbite date picker is too hard to get working in Vue!

Suggest we switch to https://vue-tailwind-datepicker.com

koonchaya commented 4 months ago

@naluinui Can you share what you have done or your progress with @RatreeOchn ? So that she can continue working on the rest of it. :)

naluinui commented 4 months ago

From what I tried I'd recommend separate the calendar to 2 tasks:

  1. Change calendar from element-plus to something else (so we can migrate away from element plus)
  2. Indicate the date that have recording (which originally this task was all about)

Me and Ant was researching which library (point 1) to go for earlier and the info is in the commit/branch above.

@RatreeOchn feel free to drop me a message anytime if you have more specific questions

naluinui commented 4 months ago

I did create the essential task above 👆and added it to this sprint instead of this one.