如何利用Angular的Kendo-Datepicker格式的首字母?
我有一个kendo-datepicker,它总是像以下那样在字段中显示格式。 ,
但我想将其自定义为月/天/年。大写第一个字母。是否可以这样自定义。
.html
<form [formGroup]="myForm">
<label for="address" class="col-sm-2 col-form-label">Date</label>
<div class="col-sm-4">
<kendo-datepicker formControlName="startingDate" format="MM/dd/yyyy">
</kendo-datepicker>
</div>
</form>
.ts
myForm: FormGroup = new FormGroup({
startingDate: new FormControl(""),
});
I have a kendo-datepicker and it's always displaying the format in the field like following.
But I want to customize this as Month/Day/Year. Capitalize the first letter. Is it possible to customize like this.
.html
<form [formGroup]="myForm">
<label for="address" class="col-sm-2 col-form-label">Date</label>
<div class="col-sm-4">
<kendo-datepicker formControlName="startingDate" format="MM/dd/yyyy">
</kendo-datepicker>
</div>
</form>
.ts
myForm: FormGroup = new FormGroup({
startingDate: new FormControl(""),
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我将覆盖CSS的日期输入。类似的内容:
工作示例:
I would override css for date input. Something like this:
Working example: Capitalize date format in form group
它是通过覆盖 k输入 CSS类来固定的。
It's fixed by overriding the k-input CSS class.