4000-520-616
欢迎来到免疫在线!(蚂蚁淘生物旗下平台)  请登录 |  免费注册 |  询价篮
主营:原厂直采,平行进口,授权代理(蚂蚁淘为您服务)
咨询热线电话
4000-520-616
当前位置: 首页 > 新闻动态 >
新闻详情
igx-date-picker - change placeHolder from \'M/d/yyyy\' to \'MM/...
来自 : CSDN技术社区 发布时间:2021-03-25

私信 访问主页

\"weixin_39633781\" weixin_39633781 2020-12-26 10:10 首页 开源项目 igx-date-picker - change placeHolder from \'M/d/yyyy\' to \'MM/DD/YYYY\' Question

I have an issue with igx-date-picker and I m not sure if I m doing it right.

igniteui-angular version: ^8.0.2 browser: Chrome Version 76.0.3809.100 (Official Build) (64-bit)

该提问来源于开源项目 IgniteUI/igniteui-angular

点赞 写回答 收藏 复制链接分享 删除 再等等 结题 再想想 5条回答

私信 访问主页

\"weixin_39859988\" weixin_39859988 2月前

This was a component design decision. Keep in mind that our datePicker component is highly customizable, and if you want to somehow manage all the elements from the input, you can create a custom template with igx-input-group and change all the elements from there, and also use the placeholder attribute:

 input class igx-date-picker__input-date igxinput placeholder ------ 

Example - https://stackblitz.com/edit/angular-custom-igx-mask-example

点赞 评论 复制链接分享

私信 访问主页

\"weixin_39633781\" weixin_39633781 2月前

Thanks for suggestion. It s works fine for me.

Mainly, I need to set a placeholder instead mask property, Is there valid reason for not exposing placeholder property ?I am just curious about this. Please advise.

点赞 评论 复制链接分享

私信 访问主页

\"weixin_39859988\" weixin_39859988 2月前

if you want to persist the same format you should use mask and format inputs

mask - Returns the date mask of the IgxDatePickerComponent when in editable dropdown mode.format - Returns the date display format of the IgxDatePickerComponent in dropdown mode.

Example:

 igx-date-picker mode dropdown  /igx-date-picker 
点赞 评论 复制链接分享

私信 访问主页

\"weixin_39633781\" weixin_39633781 2月前

Thanks for the suggestion.

I tried it on following sample project.https://stackblitz.com/angular/maxbemdvdpk

HTML code :

On selecting a date date-picker input field shows value as 08/29/2019 .But, When I click outside, date value formatted into 8/29/19

If mask set to MM/dd/yyyy , but expected values are not retained in same format ?Mainly, I need to set a placeholder instead mask property, Is there valid reason for not exposing placeholder property ?Please advise.

点赞 评论 复制链接分享

私信 访问主页

\"weixin_39735166\" weixin_39735166 2月前

We use Angular DatePipe for date formatting and YYYY and DD are not valid placeholders. You should use the placeholders that are described in the Angular DatePipe docs. In your case the resulting format string should be MM/dd/yyyy.

点赞 评论 复制链接分享 提交 再想想 采纳 为你推荐 在JavaScript中加密字符串并使用RSA技术在PHP中解密 javascriptcryptographyencryptionphp 1个回答 点击登录 提问题 欢迎建议意见 . 如何写高质量提问和回答? 采纳榜7天 被采纳次数 ProfSnail 25 幻灰龙 19 qq_34124780 154 coagenth 115 规则边缘 116 GoCityPass新加坡曼谷通票 117 cpp_learner 98 Jack_Yang(数据分析及可视化) 99 我不喜欢这个世界 810 天际的海浪 6 加急问题 500 500 基于tensorflow的模型做预测时,cpu占用率过高,如何降低程序的cpu占用率? 100 unity 设置Animation的culling type 导致游戏崩溃 100 java实现下面两个算法 100 ECDSA加密算法中,签名和验证都是需要时间的,那其时间复杂度怎么用椭圆曲线参数如阶或模p来表示呢? 75 数据库只有myd文件没有frm,myi文件,怎么打开呢 51 利用Adams联合matlab仿真求运动学反解问题 50 labview使用datasocket与c/c#程序的通信 50 python引用xlwings出问题,这个报错什么意思 ,怎么解决,谢谢大佬 50 如何用C语言实现凯撒密码对文本文件(.txt)的读取穷举暴力破解? 50 已知地图GPS坐标点A和坐标点B,获取A点往B点直线走一定距离的坐标点经纬度?

本文链接: http://igxgroup.immuno-online.com/view-721553.html

发布于 : 2021-03-25 阅读(0)
公司介绍
品牌分类
其他
联络我们
服务热线:4000-520-616
(限工作日9:00-18:00)
QQ :1570468124
手机:18915418616
官网:http://