- Ionic4 底部弹出框组件 ion-action-sheet-controller
- Ionic4 底部弹出框组件 ion-action-sheet
- Ionic4 弹窗组件 ion-alert-controller
- Ionic4 弹窗组件 ion-alert
- Ionic4 徽章组件 ion-badge
- Ionic4 按钮组件 ion-button
- Ionic4 按钮组件 ion-ripple-effect
- Ionic4 卡片组件 ion-card
- Ionic4 卡片组件 ion-card-content
- Ionic4 卡片组件 ion-card-header
- Ionic4 卡片组件 ion-card-subtitle
- Ionic4 卡片组件 ion-card-title
- Ionic4 多选框组件 ion-checkbox
- Ionic4 组件 ion-chip
- Ionic4 内容组件 ion-app
- Ionic4 内容组件 ion-content
- Ionic4 日期组件 ion-datetime
- Ionic4 日期组件 ion-picker-controller
- Ionic4 日期组件 ion-picker
- Ionic4 浮动按钮组件 ion-fab-button
- Ionic4 浮动按钮组件 ion-fab-list
- Ionic4 浮动按钮组件 ion-fab
- Ionic4 栅格系统组件 ion-col
- Ionic4 栅格系统组件 ion-row
- Ionic4 栅格系统组件 ion-grid
- Ionic4 上拉分页组件 ion-infinite-scroll-content
- Ionic4 上拉分页组件 ion-infinite-scroll
- Ionic4 组件 ion-input
- Ionic4 组件 ion-textarea
- Ionic4 列表项组件 ion-item
- Ionic4 列表项组件 ion-item-divider
- Ionic4 列表项组件 ion-item-group
- Ionic4 列表项组件 ion-item-sliding
- Ionic4 列表项组件 ion-item-options
- Ionic4 列表项组件 ion-item-option
- Ionic4 列表项组件 ion-label
- Ionic4 列表项组件 ion-note
- Ionic4 列表组件 ion-list
- Ionic4 列表组件 ion-list-header
- Ionic4 列表组件 ion-virtual-scroll
- Ionic4 媒体组件 ion-avatar
- Ionic4 媒体组件 ion-img
- Ionic4 媒体组件 ion-thumbnail
- Ionic4 侧边栏组件 ion-menu-button
- Ionic4 侧边栏组件 ion-menu-controller
- Ionic4 侧边栏组件 ion-menu-toggle
- Ionic4 侧边栏组件 ion-menu
- Ionic4 侧边栏组件 ion-split-pane
- Ionic4 模态框组件 ion-modal-controller
- Ionic4 模态框组件 ion-modal
- Ionic4 路由导航组件 ion-nav-pop
- Ionic4 路由导航组件 ion-nav-push
- Ionic4 路由导航组件 ion-nav-set-root
- Ionic4 路由导航组件 ion-nav
- Ionic4 弹出框组件 ion-popover-controller
- Ionic4 弹出框组件 ion-popover
- Ionic4 进度指示组件 ion-loading
- Ionic4 进度指示组件 ion-loading-controller
- Ionic4 进度指示组件 ion-progress-bar
- Ionic4 进度指示组件 ion-skeleton-text
- Ionic4 单选框组件 ion-radio-group
- Ionic4 单选框组件 ion-radio
- Ionic4 滑块组件组件 ion-range
- Ionic4 下拉分页组件 ion-refresher-content
- Ionic4 下拉分页组件 ion-refresher
- Ionic4 排序组件 ion-reorder-group
- Ionic4 排序组件 ion-reorder
- Ionic4 路由组件 ion-route-redirect
- Ionic4 路由组件 ion-route
- Ionic4 路由组件 ion-router-outlet
- Ionic4 路由组件 ion-router
- Ionic4 搜索框组件 ion-searchbar
- Ionic4 Tab切换组件 ion-segment-button
- Ionic4 Tab切换组件 ion-segment
- Ionic4 选择框组件 ion-select-option
- Ionic4 选择框组件 ion-select
- Ionic4 轮播图组件 ion-slide
- Ionic4 轮播图组件 ion-slides
- Ionic4 底部Tabs组件组件 ion-tab-bar
- Ionic4 底部Tabs组件组件 ion-tab-button
- Ionic4 底部Tabs组件组件 ion-tab
- Ionic4 底部Tabs组件组件 ion-tabs
- Ionic4 提示框组件 ion-toast-controller
- Ionic4 提示框组件 ion-toast
- Ionic4 开关组件 ion-toggle
- Ionic4 导航条组件 ion-toolbar
- Ionic4 导航条组件 ion-footer
- Ionic4 导航条组件 ion-header
- Ionic4 导航条组件 ion-title
- Ionic4 导航条组件 ion-buttons
- Ionic4 导航条组件 ion-back-button
- Ionic4 组件 ion-anchor
- Ionic4 组件 ion-text
- Ionic Native插件使用中文文档教程
- Ionic4 多点触控插件-多点触控 3D Touch
- Ionic4 ABBYY Real-Time Recognition插件-ABBYY Real-Time Recognition
- Ionic4 AES256插件-AES256加密
- Ionic4 Action Sheet插件-底部弹出框Action Sheet
- Ionic4 AdMob Free插件-AdMob Free
- Ionic4 AdMob Plus插件-AdMob Plus
- Ionic4 AdMob Pro插件-AdMob Pro
- Ionic4 Admob插件-Admob
- Ionic4 支付宝支付插件-支付宝支付 Alipay
- Ionic4 媒体播放插件插件-媒体播放插件 Analytics Firebase
- Ionic4 媒体播放插件-媒体播放 Android ExoPlayer
- Ionic4 安卓指纹认证插件-安卓指纹认证 Android Fingerprint Auth
- Ionic4 Android全屏插件-全屏 Android Full Screen
- Ionic4 Android权限检测插件-Android权限检测 Android Permissions
- Ionic4 Answers插件-Answers
- Ionic4 判断应用是否安装插件-判断应用是否安装 App Availability
- Ionic4 App Center Analytics插件-App Center Analytics
- Ionic4 App Center Crashes插件-App Center Crashes
- Ionic4 消息推送插件-消息推送插件App Center Push
- Ionic4 最小化应用插件-最小化应用App Minimize
- Ionic4 App Preferences插件-App Preferences
- Ionic4 App Rate插件-App Rate
- Ionic4 检测应用更新插件-应用更新 App Update
- Ionic4 获取应用版本插件-获取应用版本 App Version
- Ionic4 苹果支付插件-苹果支付 Apple Pay
- Ionic4 苹果钱包插件-苹果钱包 Apple Wallet
- Ionic4 Appodeal插件-Appodeal
- Ionic4 Appsflyer插件-Appsflyer
- Ionic4 Autostart插件-Autostart
- Ionic4 蓝牙插件-蓝牙插件BLE
- Ionic4 Background Fetch插件-Background Fetch
- Ionic4 后台定位插件-后台定位Background Geolocation
- Ionic4 防止职为后台插件-防止后台睡觉 Background Mode
- Ionic4 背后照明插件-背后照明Backlight
- Ionic4 徽章插件-徽章Badge
- Ionic4 百度推送插件-百度推送Baidu Push
- Ionic4 二维码扫描插件-二维码扫描Barcode Scanner
- Ionic4 Base64 转化成图片插件-Base64 转化成图片Base64 To Gallery
- Ionic4 文件转换成Base64格式插件-文件转换成Base64
- Ionic4 电量插件-电量Battery Status
- Ionic4 BlinkUp插件-BlinkUp
- Ionic4 蓝牙插件-蓝牙 Bluetooth Serial
- Ionic4 低功耗蓝牙插件-低功耗蓝牙BluetoothLE
- Ionic4 Braintree插件-Braintree
- Ionic4 BranchIo插件-BranchIo
- Ionic4 屏幕亮度插件-屏幕亮度Brightness
- Ionic4 通信插件-通信Broadcaster
- Ionic4 Browser Tab插件-Browser Tab
- Ionic4 日历插件-日历Calendar
- Ionic4 联系人插件-联系人 Call Directory
- Ionic4 历史通话记录插件-历史通话记录 Call Log
- Ionic4 拨打电话插件 - 拨打电话 Call Number
- Ionic4 Camera Preview插件-Camera Preview
- Ionic4 拍照插件-拍照Camera
- Ionic4 Card IO插件-Card IO
- Ionic4 Chooser插件-Chooser
- Ionic4 Class Kit插件-Class Kit
- Ionic4 CleverTap插件-CleverTap
- Ionic4 剪切板插件-剪切板 Clipboard
- Ionic4 Cloud Settings插件-Cloud Settings
- Ionic4 消息推送插件-微软消息推送 Code Push
- Ionic4 联系人插件-联系人Contacts
- Ionic4 Couchbase Lite插件-Couchbase Lite
- Ionic4 Crashlytics插件-Crashlytics
- Ionic4 图片剪切插件-图片剪切Crop
- Ionic4 获取麦克风分贝插件-获取麦克风分贝 DB Meter
- Ionic4 DNS插件-DNS
- Ionic4 日历插件插件-日历Date Picker
- Ionic4 Deeplinks插件-Deeplinks
- Ionic4 Device Accounts插件-Device Accounts
- Ionic4 Device Feedback插件-Device Feedback
- Ionic4 Device Motion插件-Device Motion
- Ionic4 Device Orientation插件-加速度 Device Orientation
- Ionic4 Device插件-设备 Device
- Ionic4 检测硬件 插件-检测硬件 Diagnostic
- Ionic4 弹出框插件-弹出框Dialogs
- Ionic4 文档查看器插件-文档查看器Document Viewer
- Ionic4 下载文件插件-下载文件Downloader
- Ionic4 Email Composer插件-Email Composer
- Ionic4 Estimote Beacons插件-Estimote Beacons
- Ionic4 Extended Device Information插件-Extended Device Information
- Ionic4 FCM插件-FCM
- Ionic4 FTP 插件
- Ionic4 Facebook 插件
- Ionic4 文件选择插件 File Chooser
- Ionic4 文件加密插件 File Encryption
- Ionic4 打开文件插件 File Opener
- Ionic4 File Path 插件
- Ionic4 文件传输插件-文件传输File Transfer
- Ionic4 文件插件-文件File
- Ionic4 Fingerprint AIO插件-Fingerprint AIO
- Ionic4 Firebase Analytics插件-Firebase Analytics
- Ionic4 Firebase Authentication插件-Firebase Authentication
- Ionic4 Firebase Config插件-Firebase Config
- Ionic4 Firebase Dynamic Links插件-Firebase Dynamic Links
- Ionic4 Firebase Messaging插件-Firebase Messaging
- Ionic4 Firebase插件-Firebase
- Ionic4 手电筒插件-手电筒Flashlight
- Ionic4 Flurry Analytics插件-Flurry Analytics
- Ionic4 高德定位插件-高德定位Gao De Location
- Ionic4 Geofence插件-Geofence
- Ionic4 Geolocation插件-定位Geolocation
- Ionic4 Globalization插件-Globalization
- Ionic4 Google Analytics插件-Google Analytics
- Ionic4 Google Nearby插件-Google Nearby
- Ionic4 Google Play Games Services插件-Google Play Games Services
- Ionic4 Google Plus插件-Google Plus
- Ionic4 陀螺仪插件-陀螺仪 Gyroscope
- Ionic4 原生插件-原生HTTP
- Ionic4 任务栏导航颜色插件-任务栏导航颜色Header Color
- Ionic4 Health Kit插件-Health Kit
- Ionic4 Health插件-Health
- Ionic4 热更新插件-热更新Hot Code Push
- Ionic4 热点网络插件-热点网络Hotspot
- Ionic4 服务器插件-服务器Httpd
- Ionic4 HyperTrack插件-HyperTrack
- Ionic4 IBeacon插件-IBeacon
- Ionic4 图片多选插件-图片多选Image Picker
- Ionic4 图片剪切插件-图片剪切Image Resizer
- Ionic4 webview插件-In App Browser
- Ionic4 In App Purchase 2插件-In App Purchase 2
- Ionic4 In App Purchase插件-In App Purchase
- Ionic4 In App Review插件-In App Review
- Ionic4 Index App Content插件-Index App Content
- Ionic4 睡眠插件-睡眠 Insomnia
- Ionic4 Instagram插件-Instagram
- Ionic4 Intel Security插件-Intel Security
- Ionic4 对讲机插件-对讲机 Intercom
- Ionic4 Is Debug插件-Is Debug
- Ionic4 Jins Meme插件-Jins Meme
- Ionic4 键盘插件-键盘 Keyboard
- Ionic4 指纹插件插件-指纹 Keychain Touch Id
- Ionic4 Keychain插件-Keychain
- Ionic4 相机预览插件-相机预览LastCam
- Ionic4 Launch Navigator插件-Launch Navigator
- Ionic4 Launch Review插件-Launch Review
- Ionic4 Line Login插件-Line Login
- Ionic4 LinkedIn 插件
- Ionic4 本地通知插件 Local Notifications
- Ionic4 更改位置 Location Accuracy
- Ionic4 MS ADAL 插件
- Ionic4 Market 插件
- Ionic4 媒体插件 Media Capture
- Ionic4 Media 媒体插件
- Ionic4 Mixpanel 插件
- Ionic4 Mobile Accessibility插件-Mobile Accessibility
- Ionic4 音频控制插件-音频控制Music Controls
- Ionic4 NFC插件-NFC
- Ionic4 Native Audio插件-Native Audio
- Ionic4 Native Geocoder插件-Native Geocoder
- Ionic4 原生键盘插件-原生键盘Native Keyboard
- Ionic4 原生页面切换插件-页面切换Native Page Transitions
- Ionic4 手机铃声插件-手机铃声 Native Ringtones
- Ionic4 本地存储插件-本地存储 Native Storage
- Ionic4 导航栏插件-导航栏 Navigation Bar
- Ionic4 网络接口插件-网络接口 Network Interface
- Ionic4 网络插件-网络 Network
- Ionic4 OneSignal插件-OneSignal
- Ionic4 调用系统设置插件-调用系统设置 Open Native Settings
- Ionic4 检索车牌插件-检索车牌OpenALPR
- Ionic4 PayPal插件-PayPal
- Ionic4 计步插件-计步Pedometer
- Ionic4 Phonegap Local Notification插件-Phonegap Local Notification
- Ionic4 图片库插件-图片库Photo Library
- Ionic4 图片预览插件-图片预览 Photo Viewer
- Ionic4 Pin Check插件-Pin Check
- Ionic4 Pin Dialog插件-Pin Dialog
- Ionic4 Pinterest插件-Pinterest
- Ionic4 电源管理插件-电源管理 Power Management
- Ionic4 打印插件-打印 Printer
- Ionic4 Pro插件-Pro
- Ionic4 消息推送插件-消息推送 Push
- Ionic4 腾讯互联 插件-腾讯互联 QQSDK
- Ionic4 扫码 QR Scanner插件-扫码 QR Scanner
- Ionic4 Regula Document Reader插件-Regula Document Reader
- Ionic4 Rollbar插件-Rollbar
- Ionic4 发送短信 插件-发送短信 SMS
- Ionic4 数据库插件-数据库 SQLite Porter
- Ionic4 SQLite插件-数据库 SQLite
- Ionic4 Safari View Controller插件-Safari View Controller
- Ionic4 锁定屏幕方向插件-锁定屏幕方向 Screen Orientation
- Ionic4 捕捉屏幕截图插件-捕捉屏幕截图 Screenshot
- Ionic4 本地存储 插件-本地存储 Secure Storage
- Ionic4 Sensors插件-Sensors
- Ionic4 Serial插件-Serial
- Ionic4 摇一摇插件-摇一摇 Shake
- Ionic4 获取Sim卡信息 插件-获取Sim卡信息 Sim
- Ionic4 Siri Shortcuts插件-Siri Shortcuts
- Ionic4 本地分享插件-本地分享 Social Sharing
- Ionic4 语音识别插件-语音识别Speech Recognition
- Ionic4 SpeechKit插件-SpeechKit
- Ionic4 Spinner Dialog插件-Spinner Dialog
- Ionic4 启动画面插件-启动画面Splash Screen
- Ionic4 数据库插件-数据库Sqlite Db Copy
- Ionic4 StarPRNT插件-StarPRNT
- Ionic4 状态栏插件-状态栏 Status Bar
- Ionic4 Stepcounter插件-Stepcounter
- Ionic4 Streaming Media插件-Streaming Media
- Ionic4 Stripe插件-Stripe
- Ionic4 Taptic Engine插件-Taptic Engine
- Ionic4 Tealium插件-Tealium
- Ionic4 TealiumAdIdentifier插件-TealiumAdIdentifier
- Ionic4 TealiumInstallReferrer插件-TealiumInstallReferrer
- Ionic4 文本转换语音插件-文本转换语音Text To Speech
- Ionic4 浏览器插件插件-浏览器插件 Themeable Browser
- Ionic4 弹出框插件-弹出框Toast
- Ionic4 Touch ID插件-指纹扫描Touch ID
- Ionic4 Twitter Connect插件-Twitter Connect
- Ionic4 唯一标识插件-唯一标识Uid
- Ionic4 唯一标识插件-唯一标识Unique Device ID
- Ionic4 Uptime插件-Uptime
- Ionic4 User Agent插件-User Agent
- Ionic4 振动插件-振动Vibration
- Ionic4 Video Capture Plus插件-Video Capture Plus
- Ionic4 视频编辑插件-视频编辑 Video Editor
- Ionic4 视频播放 插件-视频播放 Video Player
- Ionic4 Web Intent插件-Web Intent
- Ionic4 Web Server插件-Web Server
- Ionic4 Webengage插件-Webengage
- Ionic4 微信支付插件-微信支付 Wechat
- Ionic4 WheelSelector Plugin插件-WheelSelector Plugin
- Ionic4 Youtube Video Player插件-Youtube Video Player
- Ionic4 扫码插件-扫码ZBar
- Ionic4 Zeroconf插件-Zeroconf
- Ionic4 压缩减压插件-压缩减压Zip
- Ionic4 hce插件-hce
- Ionic4 iOS DocumentPicker插件-iOS DocumentPicker
- Ionic4 iOS File Picker插件-iOS File Picker
- Ionic4 jAnalytics插件-jAnalytics
- Ionic 图标
- 使用 Ionic 图标
Ionic4 日期组件 ion-datetime
Ionic4 项目中我们可以使用 Ionic4 日期组件 ion-datetime 对项目进行布局。
ion-datetime 官方文档地址:https://ionicframework.com/docs/api/datetime
Datetimes present a picker interface from the bottom of a page, making it easy for users to select dates and times. The picker displays scrollable columns that can be used to individually select years, months, days, hours and minute values. Datetimes are similar to the native input
elements of type datetime-local
, however, Ionic's Datetime component makes it easy to display the date and time in a preferred format, and manage the datetime values.
Display and Picker Formats
The datetime component displays the values in two places: in the <ion-datetime>
component, and in the picker interface that is presented from the bottom of the screen. The following chart lists all of the formats that can be used.
Format | Description | Example |
---|---|---|
YYYY | Year, 4 digits | 2018 |
YY | Year, 2 digits | 18 |
M | Month | 1 ... 12 |
MM | Month, leading zero | 01 ... 12 |
MMM | Month, short name | Jan |
MMMM | Month, full name | January |
D | Day | 1 ... 31 |
DD | Day, leading zero | 01 ... 31 |
DDD | Day, short name | Fri |
DDDD | Day, full name | Friday |
H | Hour, 24-hour | 0 ... 23 |
HH | Hour, 24-hour, leading zero | 00 ... 23 |
h | Hour, 12-hour | 1 ... 12 |
hh | Hour, 12-hour, leading zero | 01 ... 12 |
a | 12-hour time period, lowercase | am pm |
A | 12-hour time period, uppercase | AM PM |
m | Minute | 1 ... 59 |
mm | Minute, leading zero | 01 ... 59 |
s | Second | 1 ... 59 |
ss | Second, leading zero | 01 ... 59 |
Z | UTC Timezone Offset | Z or +HH:mm or -HH:mm |
Important: See the Month Names and Day of the Week Names section below on how to use different names for the month and day.
Display Format
The displayFormat
input property specifies how a datetime's value should be printed, as formatted text, within the datetime component.
In the following example, the display in the <ion-datetime>
will use the month's short name, the numerical day with a leading zero, a comma and the four-digit year. In addition to the date, it will display the time with the hours in the 24-hour format and the minutes. Any character can be used as a separator. An example display using this format is: Jun 17, 2005 11:06
.
<ion-datetime></ion-datetime>
Important: ion-datetime
will always display values relative to the user's timezone. Given a value of 09:00:00+01:00
, the datetime component will display it as 04:00:00-04:00
for users in a -04:00
timezone offset.
Picker Format
The pickerFormat
input property determines which columns should be shown in the interface, the order of the columns, and which format to use within each column. If the pickerFormat
input is not provided then it will default to the displayFormat
.
In the following example, the display in the <ion-datetime>
will use the MM/YYYY
format, such as 06/2020
. However, the picker interface will display two columns with the month's long name, and the four-digit year.
<ion-datetime presentation="date-time" [preferWheel]="true"></ion-datetime>
Datetime Data
Historically, handling datetime values within JavaScript, or even within HTML inputs, has always been a challenge. Specifically, JavaScript's Date
object is notoriously difficult to correctly parse apart datetime strings or to format datetime values. Even worse is how different browsers and JavaScript versions parse various datetime strings differently, especially per locale.
Fortunately, Ionic's datetime input has been designed so developers can avoid the common pitfalls, allowing developers to easily format datetime values within the input, and give the user a simple datetime picker for a great user experience.
ISO 8601 Datetime Format: YYYY-MM-DDTHH:mmZ
Ionic uses the ISO 8601 datetime format for its value. The value is simply a string, rather than using JavaScript's Date
object. Additionally, when using the ISO datetime format, it makes it easier to serialize and pass within JSON objects, and sending databases a standardized format which it can be easily parsed if need be.
An ISO format can be used as a simple year, or just the hour and minute, or get more detailed down to the millisecond and timezone. Any of the ISO formats below can be used, and after a user selects a new value, Ionic will continue to use the same ISO format which datetime value was originally given as.
Description | Format | Datetime Value Example |
---|---|---|
Year | YYYY | 1994 |
Year and Month | YYYY-MM | 1994-12 |
Complete Date | YYYY-MM-DD | 1994-12-15 |
Date and Time | YYYY-MM-DDTHH:mm | 1994-12-15T13:47 |
UTC Timezone | YYYY-MM-DDTHH:mm:ssTZD | 1994-12-15T13:47:20.789Z |
Timezone Offset | YYYY-MM-DDTHH:mm:ssTZD | 1994-12-15T13:47:20.789+05:00 |
Hour and Minute | HH:mm | 13:47 |
Hour, Minute, Second | HH:mm:ss | 13:47:20 |
Note that the year is always four-digits, milliseconds (if it's added) is always three-digits, and all others are always two-digits. So the number representing January always has a leading zero, such as 01
. Additionally, the hour is always in the 24-hour format, so 00
is 12am
on a 12-hour clock, 13
means 1pm
, and 23
means 11pm
.
It's also important to note that neither the displayFormat
or pickerFormat
can set the datetime value's output, which is the value that is set by the component's ngModel
. The format's are merely for displaying the value as text and the picker's interface, but the datetime's value is always persisted as a valid ISO 8601 datetime string.
Min and Max Datetimes
Dates are infinite in either direction, so for a user's selection there should be at least some form of restricting the dates that can be selected. By default, the maximum date is to the end of the current year, and the minimum date is from the beginning of the year that was 100 years ago.
To customize the minimum and maximum datetime values, the min
and max
component inputs can be provided which may make more sense for the app's use-case, rather than the default of the last 100 years. Following the same IS0 8601 format listed in the table above, each component can restrict which dates can be selected by the user. Below is an example of restricting the date selection between the beginning of 2016, and October 31st of 2020:
<ion-datetime minuteValues="0,15,30,45" dayValues="5,10,15,20,25,30"></ion-datetime>
Month Names and Day of the Week Names
At this time, there is no one-size-fits-all standard to automatically choose the correct language/spelling for a month name, or day of the week name, depending on the language or locale.
The good news is that there is an Intl.DatetimeFormat standard which most browsers have adopted.
However, at this time the standard has not been fully implemented by all popular browsers so Ionic is unavailable to take advantage of it yet.
Additionally, Angular also provides an internationalization service, but it is still under heavy development so Ionic does not depend on it at this time.
The current best practice is to provide an array of names if the app needs to use names other than the default English version of month and day names. The month names and day names can be either configured at the app level, or individual ion-datetime
level.
Component Input Level
Advanced Datetime Validation and Manipulation
The datetime picker provides the simplicity of selecting an exact format, and persists the datetime values as a string using the standardized ISO 8601 datetime format . However, it's important to note that ion-datetime
does not attempt to solve all situations when validating and manipulating datetime values. If datetime values need to be parsed from a certain format, or manipulated (such as adding 5 days to a date, subtracting 30 minutes, etc.), or even formatting data to a specific locale, then we highly recommend using date-fns to work with dates in JavaScript.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论