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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sc-component/react-datefield

v1.0.13

Published

Un composant DateField React personnalisable

Readme


📅 react-datefield

Voir sur GitHub

React simple, personnalisable et typé pour la saisie de dates dans vos formulaires.

📸 Aperçu

Capture react-datefield


🚀 Description

react-datefield est un composant React réutilisable pour la saisie de dates, pensé pour s'intégrer facilement dans tous vos formulaires. Il gère la validation, l'affichage des erreurs et la personnalisation via des props.
Idéal pour les projets nécessitant une expérience utilisateur fluide et accessible sur la gestion des dates.


🛠️ Technologies utilisées

JavaScript React CSS3 Jest Babel PropTypes

  • prop-types 15.8.1
  • Jest 29.7.0
  • @testing-library/react 16.3.0
  • Babel 7.21.x

📦 Installation

npm install @sc-component/react-datefield
# ou
yarn add @sc-component/react-datefield

📝 Utilisation

import DateField from '@sc-component/react-datefield';

function MonFormulaire() {
  const register = () => ({}); // Remplacez par votre logique de formulaire
  const errors = {};

  return (
    <form>
      <DateField name="date" register={register} errors={errors} />
    </form>
  );
}

Important : Pour que les styles soient appliqués, importez explicitement le CSS dans votre projet principal si besoin :

js import '@sc-component/react-datefield/dist/components/styles/datefield.css'; (Nécessaire si votre bundler ne gère pas automatiquement les imports CSS dans node_modules.)


⚙️ Scripts disponibles

  • npm run build : Transpile le code source avec Babel.
  • npm run test : Lance la suite de tests unitaires avec Jest.
  • npm run prepublishOnly : Build automatique avant publication npm.

🧪 Tests

Lancer les tests unitaires

npm run test

Les tests sont écrits avec Jest et @testing-library/react.
Vous pouvez les retrouver dans src/components/DateField.test.jsx.


🤝 Contribuer

Les contributions sont bienvenues !
Pour contribuer :

  1. Forkez ce dépôt
  2. Créez une branche (git checkout -b feature/ma-nouvelle-feature)
  3. Commitez vos modifications (git commit -m 'Ajout nouvelle feature')
  4. Poussez la branche (git push origin feature/ma-nouvelle-feature)
  5. Ouvrez une Pull Request

📄 Licence

Ce projet est sous licence MIT.
Voir le fichier LICENSE pour plus d’informations.


N’hésitez pas à ouvrir une issue ou une PR pour toute suggestion ou amélioration !