1.0.0 • Published 4 years ago

credit-card-expiry-date v1.0.0

Weekly downloads
11
License
MIT
Repository
github
Last release
4 years ago

React component for credit card expiry date input Demo: https://1lfmm.csb.app

Usage:

import React, { useState } from "react";
import ExpiryDateInput from "credit-card-expiry-date";

export default function App() {
  const [expiryDate, setExpiryDate] = useState({
    value: ""
  });

  const handleExpiryDate = date => {
    setExpiryDate({
      value: date
    });
  };

  return (
    <div className="App">
      <div style={{ width: "100px" }}>
        <ExpiryDateInput
          label="Expiry Date"
          onChange={date => handleExpiryDate(date)}
          value={expiryDate}
          disabled={false}
          onBlur={date => handleExpiryDate(date)}
        />
      </div>
    </div>
  );
}

codesandbox: https://codesandbox.io/s/expiry-date-1lfmm

source code credit: https://www.linkedin.com/in/nur-liyana-mohd-lazim-220847114/

1.0.0

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

6.1.2

4 years ago