Skip to content

Latest commit

 

History

History
63 lines (54 loc) · 1.36 KB

Calendar.md

File metadata and controls

63 lines (54 loc) · 1.36 KB

Component Keyboard mapping lvgl lv_calendar)

It's used to realize a virtual keyboard to write texts into a Text area.

Api

Props

  • style
  • align
  • alignTo
  • today
    • will highlight the current day
  • shownMonth
    • set the shown date
  • highLightDates
    • The list of highlighted dates
  • onChange

Usage

import { Calendar, Render, EAlignType } from 'lvgljs-ui';
import React, { useState } from 'react';

function App () {

    return (
        <Calendar
            today={"2022-10-1"}
            shownMonth={"2022-10"}
            highLightDates={[
                "2022-10-10",
                "2022-10-11",
            ]}
            align={{
                type: EAlignType.ALIGN_CENTER,
                pos: [0, 27]
            }}
            onChange={(e) => { console.log(e.value) }}
        />
    )
};

const style = {
    window: {
        'width': '480px',
        'height': '320px',
    },
    calendar: {
        'width': 185,
        'height': 185,
    }
};

Render.render(<App />);

Demo

test/calendar