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

bikram-sambat-bootstrap

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bikram-sambat-bootstrap - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

4

package.json
{
"name": "bikram-sambat-bootstrap",
"version": "1.0.2",
"version": "1.1.0",
"description": "bikram sambat datepicker for bootstrap",

@@ -26,5 +26,5 @@ "main": "src/bikram-sambat-bootstrap.js",

"dependencies": {
"bikram-sambat": "^1.3.8",
"bikram-sambat": "^1.4.0",
"eurodigit": "^3.1.1"
}
}

@@ -9,2 +9,24 @@ var bs = require('bikram-sambat');

function addChangeListener($parent, selecters, onChange) {
if(arguments.length === 1) {
onChange = $parent;
selecters = {};
$parent = $('body');
} else if(arguments.length === 2) {
onChange = selecters;
if($parent instanceof jQuery) {
selecters = {};
} else {
selecters = $parent;
$parent = $('body');
}
}
$parent.find(selecters.numberInput || '.devanagari-number-input')
.on('input', onChange);
$parent.find(selecters.monthToggle || '.bikram-sambat-input-group .dropdown-menu li a')
.on('click', onChange);
}
function initListeners($parent, selecters) {

@@ -53,10 +75,24 @@ if(arguments.length === 0) {

module.exports = window.bikram_sambat_bootstrap = {
addChangeListener: addChangeListener,
getDate: function($inputGroup) {
// TODO handle fields not set, out of bounds etc.
var year = fieldValue($inputGroup, '[name=year]');
var month = fieldValue($inputGroup, '[name=month]');
var day = fieldValue($inputGroup, '[name=day]');
return bs.toGreg(year, month, day);
try {
return bs.toGreg(year, month, day);
} catch(e) {
return null;
}
},
getDate_text: function($inputGroup) {
var year = fieldValue($inputGroup, '[name=year]');
var month = fieldValue($inputGroup, '[name=month]');
var day = fieldValue($inputGroup, '[name=day]');
try {
return bs.toGreg_text(year, month, day);
} catch(e) {
return null;
}
},
initListeners: initListeners,
};

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