Giter Site home page Giter Site logo

Comments (7)

Ataraxy avatar Ataraxy commented on May 22, 2024 2

I think 1 would probably be ideal since the built in ones are optional. It's probably better that they're distinct actions also since clear/confirm are important.

from naive-ui.

07akioni avatar 07akioni commented on May 22, 2024

I'm thinking of it. However I wonder where to put it.
There are 2 options.

1.
calendar
------
actions
------
(builtin) confirm
2.
calendar
------
actions + (builtin actions)

Do you have any idea?

from naive-ui.

07akioni avatar 07akioni commented on May 22, 2024

Since date-picker should work with form-item. I can't easily expose the internal change events emitter to the user. So I'm going to provide a ant-design-like api.

...
ranges={{
  Today: [xx, xx],
  'This Month': [xx, xx],
}}
...

from naive-ui.

Ataraxy avatar Ataraxy commented on May 22, 2024

Yeah that would be pretty nice. The ant design solution works pretty well. Though they appear to be inline with the built in actions. That's not inherently bad and might even be preferable than having it on a seperate row. My only concern with that was how it would look if someone had many ranges. They even highlight the ranges on hover and automatically confirm on selection which is pretty slick.

They also have the "Extra Footer" slot.

from naive-ui.

07akioni avatar 07akioni commented on May 22, 2024

Yeah that would be pretty nice. The ant design solution works pretty well. Though they appear to be inline with the built in actions. That's not inherently bad and might even be preferable than having it on a seperate row. My only concern with that was how it would look if someone had many ranges. They even highlight the ranges on hover and automatically confirm on selection which is pretty slick.

They also have the "Extra Footer" slot.

Do you have time to implement a footer slot? PR is welcomed. You can pass down the slots of date-picker from setup in date-picker by provide it and inject it into the panels. Then render it is very easy.

from naive-ui.

07akioni avatar 07akioni commented on May 22, 2024

For footer slot you can open an new issue.

from naive-ui.

Developer27149 avatar Developer27149 commented on May 22, 2024

@07akioni 你好,是因为这个组件和表单功能有关联,所以不方便增加自定义对此刻确认的自定义插槽支持吗?我的英语不太好。

from naive-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.