Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Feat: New Component - DateTimePicker #17

@acneidert

Description

@acneidert

Describe Problem/Implemention

Create a new component called DateTimePicker, must be showed by a click on Input or in button on side
The component is Date Time default, other options are:

  • Only Date ('26/10/1995')
  • Only Time ('13:00' | '01:23 PM')
  • Only Month ('01' | 'Jan')
  • Only Year ('2023')
  • Only Month and Year ('Jan/2023')

Must has Button to select Today
Attention on new HTML apis for dev and Nullstack version ( v0.19.0 handle dates natively )
Attention on mobile - must be developed Mobile Fisrt
Tip: use day.js to manage date
Tip: use @floating-ui/dom and see Tooltip Component

Possible Props

  • bind: Date - Date Selected
  • mask: String - How date is Showed for user read this
  • show: Boolean - Is Showed Dropdown
  • todayBtn: Boolean (false) - Is Button Today Showed/
  • type: 'date' | 'time' | 'month' | 'year' | 'month-year' - [Discuss] - Types of selected dates
  • onShow: Function - [Discuss] - Trigger some function when Showed
  • onHide: Function - [Discuss] - Trigger some function when Hided
  • onToogle: Function - [Discuss] - Trigger some function when Toogled

Sugestion of solution

class Test {
  date = new Date()
  render() {
      return (<DateTimePicker bind={this.date} mask="DD/MM/YYYY" />)
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions