Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

frontello-ui-datepicker

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frontello-ui-datepicker - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

44

datepicker.js

@@ -10,2 +10,3 @@ "use strict";

classContainer: 'frontello-ui-datepicker',
classControls: 'frontello-ui-datepicker-controls',
labelYear: 'Year',

@@ -30,4 +31,3 @@ labelMonth: 'Month',

this.field.style.display = 'none';
this.nulable = this.field.required;
this.nulable = !(this.field.required);
this.date = null;

@@ -192,3 +192,3 @@ this.picker = null;

this._renderHeader();
this._renderLabel();

@@ -208,6 +208,6 @@ this._buildYearPicker();

_renderHeader()
_renderLabel()
{
if (this.date == null) {
this.currentDate.innerText = this.config.labelNoDate;
this.fieldLabel.value = this.config.labelNoDate;

@@ -217,3 +217,3 @@ return;

this.currentDate.innerText = this.getDateFriendly();
this.fieldLabel.value = this.getDateFriendly();
}

@@ -271,10 +271,20 @@

{
// clone field
this.fieldLabel = this.field.cloneNode(true);
this.fieldLabel.setAttribute('value', '');
this.fieldLabel.value = '';
this.fieldLabel.type = 'text';
this.fieldLabel.readOnly = true;
this.field.after(this.fieldLabel);
// hide field
this.field.style.display = 'none';
this.container = document.createElement('div');
this.container.classList.add(this.config.classContainer);
this.container.style.userSelect = 'none';
this.fieldLabel.after(this.container);
this.field.parentNode.insertBefore(this.container, this.field.nextSibling);
this._buildControls();
this._buildControls();
this._buildCurrentDate();
this._buildHeader();

@@ -286,2 +296,6 @@ this._buildNav();

{
let controls = document.createElement('nav');
controls.classList.add(this.config.classControls);
this.fieldLabel.after(controls);
if (this.nulable) {

@@ -294,3 +308,3 @@ let clear = document.createElement('a');

});
this.container.append(clear);
controls.append(clear);
}

@@ -304,13 +318,5 @@

});
this.container.append(today);
controls.append(today);
}
_buildCurrentDate()
{
this.currentDate = document.createElement('div');
this.currentDate.classList.add('current-date');
this.container.append(this.currentDate);
}
_buildHeader()

@@ -317,0 +323,0 @@ {

{
"name": "frontello-ui-datepicker",
"version": "1.0.2",
"version": "1.1.0",
"description": "UI datepicker",

@@ -5,0 +5,0 @@ "main": "datepicker.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc