
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@geom_team/ngx-date-picker
Advanced tools
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
This library was generated with Angular CLI version 11.2.14.
基于ng-zorro-antd date-picker 组件实现,添加季度选择功能
#use npm
npm install @geom_team/ngx-date-picker
#use yarn
yarn add @geom_team/ngx-date-picker
import { NgxDatePickerModule } from '@geom_team/ngx-date-picker'
@NgModule({
declarations: [
// ...
],
imports: [
NgxDatePickerModule
],
providers: [],
bootstrap: [
// ...
]
})
export class AppModule { }
import { Component } from '@angular/core';
@Component({
selector: 'date-picker-demo',
templateUrl: './date-picker.component.html',
styleUrls:['./date-picker.component.less'],
})
export class DatePickerDemoComponent {
formatMap: Record<string, string> = {
date: 'yyyy-MM-dd',
time: 'HH:mm:ss',
week: 'yyyy-ww',
quarter: 'yyyy-[Q]Q',
month: 'yyyy/MM',
year: 'yyyy',
dateTime: 'yyyy-MM-dd HH:mm:ss',
}
language = 'zh_CN';
datePickerConfig = {
isInline:false,
mode: 'date',
showTime: true,
isRange: false,
format: this.formatMap['date'],
size: 'default',
disabled: false,
}
formattedDate:string = '';
inputValue = new Date();
onDateChange(date: any) {
console.log("date: ", date)
}
changeLanguage() {
if (this.language === 'zh_CN') {
this.language = 'en_US';
} else {
this.language = 'zh_CN';
}
}
}
<h2>日期季度选择器组件</h2>
<button nz-button nzType="primary" (click)="changeLanguage()">切换语言</button>
<br/>
<ngx-date-picker
[nzBorderless]="false"
[nzStatus]="'error'"
[nzMode]="datePickerConfig.mode"
[isRange]="datePickerConfig.isRange"
[nzInline]="datePickerConfig.isInline"
[nzShowTime]="datePickerConfig.showTime"
[nzFormat]="datePickerConfig.format"
[nzSize]="datePickerConfig.size"
[nzDisabled]="datePickerConfig.disabled"
[language]="language"
[(ngModel)]="inputValue"
(ngModelChange)="onDateChange($event)"
(nzOnOk)="onDateChange($event)"
>
</ngx-date-picker>
<p>{{inputValue}}</p>
API及事件方法与nz-date-picker组件一致
FAQs
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
The npm package @geom_team/ngx-date-picker receives a total of 2 weekly downloads. As such, @geom_team/ngx-date-picker popularity was classified as not popular.
We found that @geom_team/ngx-date-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.