Git Product home page Git Product logo

mpdatepicker's Introduction

mpdatepicker

Materialize Persian Date and time picker by A1Gard 4xmen.ir

installation

  • npm:
    • npm i mpdatepicker
  • yarn:
    • yarn add mpdatepicker

screenshot

mp datetime picker

How to use

Add jquery:

<script type="text/javascript" src="../dist/jquery.min.js"></script>

Add additional font for best view or use Vazir-Matn-Font:

<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/gh/rastikerdar/[email protected]/Vazirmatn-font-face.css"/> 

Add css and jquery plugin To end of your project:

<script type="text/javascript" src="node_modules/mpdatepicker/dist/jquery.mpdatepicker.min.js"></script>
<link type="text/css" rel="stylesheet" href="node_modules/mpdatepicker/dist/jquery.mpdatepicker.min.css"/>

Add Html :

<input class="sample-date-picker bg-white w-100 p-3"
       placeholder="تاریخ" type="text" id="date">

use plugin :

$(function () {
    $(".sample-date-picker").mpdatepicker({
        'timePicker': true,
        onOpen: function () {
            console.log('open');
        },
        onSelect: function (selected) {
            console.log('select', selected);
        },
        onChange: function (oldVal, newVal) {
            console.log('change', oldVal, newVal);
        },
        onClose: function () {
            console.log('close');
        },
    });
});

Options & events

name default action
timePicker false time picker active or not
timeChangeSensitivity 5 time picker sensitivity on drag up/down
fontStyle null font style for modal
gSpliter - split date
onOpen event trigger when open modal
onClose event trigger when close modal
onSelect event trigger on select end
onChange event trigger on change selected

mpdatepicker's People

Contributors

a1gard avatar yasindehfuli avatar homazd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.