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

sanjab-persian-date-picker

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sanjab-persian-date-picker

Persian date picker for laravel sanjab (https://github.com/sanjabteam/sanjab)

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Persian Date Picker for Sanjab

Installation

Before start make sure you know how laravel mix works!


Install npm packages including laravel mix.

npm install

Install the sanjab npm package.

npm install sanjab --save-dev

Install sanjab Persian Date picker via npm.

npm install sanjab-persian-date-picker --save-dev

You should install the same version of the composer package if you don't have latest version.

npm install sanjab@VERSION --save-dev

Install sanjab Persian Date picker via composer.

composer require sanjabteam/sanjab-persian-date-picker

Create sanjab JS for custom compile if not created before.

resources/js/sanjab.js:

require('sanjab');

Vue.use(require('sanjab-persian-date-picker').default); // Add this to support persian date picker

if (document.querySelector('#sanjab_app')) {
    window.sanjabApp = new Vue({
        el: '#sanjab_app',
    });
}

add js file to webpack.mix.js for compile.

mix.js('resources/js/sanjab.js', 'public/vendor/sanjab/js')

Compile and you are ready.

npm run prod

Usage

use SanjabPersianDatePicker\PersianDatePickerWidget;

// Date only
$this->widgets[] = PersianDatePickerWidget::create('birth_date')
    ->rules('jdate_before:'.verta()->formatDate())
    ->required();

// Date and time
$this->widgets[] = PersianDatePickerWidget::create('released_at')
    ->rules('jdate_before:'.verta()->formatDate())
    ->required()
    ->time(true);

Credits

License

The MIT License (MIT). Please see License File for more information.

FAQs

Package last updated on 26 May 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc