npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

p-calendar-ptbr

v1.0.8

Published

É um datepicker do PrimeNG já em português. Está é uma alternativa para o <b>p-calendar</b> do PrimeNG e suporta a maioria de suas propriedades.

Downloads

52

Readme

p-calendar-ptbr

É um datepicker do PrimeNG já em português. Está é uma alternativa para o p-calendar do PrimeNG e suporta a maioria de suas propriedades.

It is a datepicker of PrimeNG in portuguese. This is an alternative for PrimeNG's p-calendar and supports the most of its properties.

Getting started (Prerando o uso)

  • Install PrimeNG

npm install primeng --save

  • Install Font-Awesome

npm install font-awesome --save

  • Configure required styles at the styles section

"styles": [   "../node_modules/font-awesome/css/font-awesome.min.css",   "../node_modules/primeng/resources/themes/omega/theme.css",   "../node_modules/primeng/resources/primeng.min.css",   //... ],

  • Install this component

npm install p-calendar-ptbr --save

  • and then from your Angular AppModule:

import { PCalendarPtbrModule } from 'p-calendar-ptbr';

@NgModule({  declarations: [    AppComponent  ],  imports: [    BrowserModule,    PCalendarPtbrModule  ],  providers: [],  bootstrap: [AppComponent] })

Basic usage (Uso básico)

Example 1:

<p-calendar-ptbr></p-calendar-ptbr>

Example 2:

<p-calendar-ptbr [yearNavigator]="true" yearRange="1900:2018" [monthNavigator]="true"></p-calendar-ptbr>

All properties supported (Todas as propriedades suportadas)

Pode ser usado como um p-calendário original do PrimeNG, a principal diferença entre estes, é que o p-calendar-ptbr precisa que quando a propriedade passada for um valor diferente de uma string ou número você faça um binding nessa propriedade, passando-a dentro dos colchetes '[]'.

Desta forma, booleanos, objetos e outros, precisam que a propriedade esteja dentro de colchetes.

Todas as propriedades suportadas estão no exemplo abaixo.

It can be used like a original PrimeNG's p-calendar, the main different between these, is that the p-calendar-ptbr needs that when the property passed is a value different of a string or number, it needs that you make a binding at this property, passing it inside of brackets '[ ]'.

This way, booleans, objects, and any others, need tha the property is into a brackets.

All properties supported are listed bellow.

Example 1:

<p-calendar-ptbr [showButtonBar]="false" [showTime]="false" [yearNavigator]="true" yearRange="1900:2018" [showIcon]="true" [monthNavigator]="false" [readonlyInput]="true" placeholder="Seu texto" clearButtonStyleClass="ui-secondary-button" todayButtonStyleClass="ui-secondary-button" maxDateCount="3" selectionMode="multiple" inputId="my-Date" [disabled]="false" [inline]="false" [minDate]="data" [maxDate]="data" [disabledDates]="arrayDatas" disabledDays="[4,5]" [timeOnly]="false" [required]="true"> </p-calendar-ptbr>

How to get a returned value (Como pegar o valor retornado)

Este componente funciona como um componente pai para o p-calendar, de modo que o valor assumido pelo componente filho deve passar para o pai através de um event-binding. Eu nomeei esse EventEmitter para "value", e pode ser capturado de uma das seguintes maneiras:

This component works like a father component for the p-calendar, so the value took by the son component should pass to father through of a event binding. I named this EventEmitter for "value" and it can be catch in one of the following ways:

Calling a method in your component and passing the $event (Chamando um método no seu componente e passando o valor retornado no $event)

<p-calendar-ptbr (value)="aoAdicionar($event)"></p-calendar-ptbr>

Passing to variable in your component (Passando para uma variável em seu componente)

<p-calendar-ptbr (value)="data = $event"></p-calendar-ptbr>

Passing to a property of an object in your component (Passando para uma propriedade de um objeto no seu componente)

<p-calendar-ptbr (value)="cliente.dataCadastro = $event"></p-calendar-ptbr>

Author

  • Daniel Oliveira