JavaScript Calendar

JavaScript Calendar: Year-Month Picker

Enhance your web applications with a JavaScript calendar specialising in year and month-only selections, providing a streamlined experience for users needing to pick broader date ranges without specific days.

Example

JavaScript Year-Month Picker

This feature allows for a simplified interface where users can quickly navigate and select a particular year and month, ideal for reports, archives, and any scenario where the day of the month is secondary.

<html>
<script src="https://jsuites.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" />

<input id='calendar' />

<script>
// Enable the year and month picker
jSuites.calendar(document.getElementById('calendar'), {
    type: 'year-month-picker',
    format: 'MMM-YYYY',
    validRange: [ '2024-02-01', '2025-12-31' ]
});
</script>
</html>
import { Calendar } from 'jsuites/react'
import { useRef } from 'react'
import 'jsuites/dist/jsuites.css'


function App() {
  const calendar = useRef(null);

  return (
    <div className="App">
      <Calendar ref={calendar} type={'year-month-picker'}
        format={'MMM-YYYY'}
        validRange={['2024-02-01', '2025-12-31']} />
    </div>
  );
}

export default App;
<template>
    <Calendar ref="calendar" type="year-month-picker" format="DD/MM/YYYY HH:MM" :validRange="['2024-02-01', '2025-12-31']" />
</template>

<script>
import { Calendar } from "jsuites/vue";
import 'jsuites/dist/jsuites.css'

export default {
    name: 'App',
    components: {
        Calendar
    },
}
</script>