Giter VIP home page Giter VIP logo

date_time_component_demo's Introduction

date_time_component_demo

微信小程序自定义时间选择器(包含日期和时间)

在微信小程序的开发过程中,我们有时候会使用到日期时间的选择,但是目前微信小程序官方的picker中只有日期选择和时间选择,这两种mode是分开的,不能满足我们需要的条件,所以我花了一些时间来自定义了一个日期时间选择器。 它实现了日期时间的选中,通过format来定义时间的格式,'YYYY-MM-DD hh:mm'代表选择器可选择年月日时分,'YYYY-MM-DD hh:mm:ss'则代表选择器可选择年月日时分秒;通过mode来区分传入的时间参数类型,'time'代表传入的时间参数为时间字符串类型(例如'2020-07-04 08:30:00'),'date'代表传入的时间参数为Date类型(例如 new Date('2020-07-04 08:30:00'));text和placeholder则用来显示picker的显示值以及显示值为空的默认值;最后可通过style来设置选择器的显示样式。

  • 年月日时分选择器

  • 年月日时分秒选择器

date_time_component_demo's People

Contributors

1691665955 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

tangchuang

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.