Socket
Socket
Sign inDemoInstall

@blockly/field-date

Package Overview
Dependencies
105
Maintainers
2
Versions
97
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @blockly/field-date

A Blockly date picker field that uses the browser's date picker.


Version published
Weekly downloads
1.1K
increased by24.31%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

@blockly/field-date Built on Blockly

A Blockly plugin that uses a browser default "date" input.

Installation

Yarn

yarn add @blockly/field-date

npm

npm install @blockly/field-date --save

Usage

JavaScript

import * as Blockly from 'blockly';
import {FieldDate} from '@blockly/field-date';

Blockly.Blocks['test_fields_date'] = {
  init: function () {
    this.appendDummyInput()
      .appendField('date: ')
      .appendField(new FieldDate('2020-02-20'), 'FIELDNAME');
  },
};

JSON

import * as Blockly from 'blockly';
import '@blockly/field-date';

Blockly.defineBlocksWithJsonArray([
  {
    type: 'test_fields_date',
    message0: 'date: %1',
    args0: [
      {
        type: 'field_date',
        name: 'FIELDNAME',
        date: '2020-02-20',
      },
    ],
  },
]);

License

Apache 2.0

Keywords

FAQs

Last updated on 25 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc