Socket
Socket
Sign inDemoInstall

nativescript-numberpicker

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nativescript-numberpicker

nativescript-numberpicker.


Version published
Weekly downloads
5
Maintainers
1
Install size
92.6 kB
Created
Weekly downloads
 

Readme

Source

nativescript-numberpicker

A nativescript plugin for number picker

install

tns plugin add nativescript-numberpicker

add this to your references.d.ts for typescript support

    /// <reference path="./node_modules/nativescript-numberpicker/numberpicker.d.ts" /> Needed for autocompletion and compilation.

Usage in xml

add this to your namespace xmlns:numberpicker="nativescript-numberpicker" then use like this <numberpicker:NumberPicker value="3" minValue="2" maxValue="6" id="np"/>

see the example below

    <Page 
    xmlns="http://schemas.nativescript.org/tns.xsd"
    xmlns:numberpicker="nativescript-numberpicker" loaded="loaded">
    <StackLayout style.backgroundColor="green" id="Mycontainer">
        <Label text="Find numberpicker below" class="message" textWrap="true"/>
        <numberpicker:NumberPicker value="3" minValue="2" maxValue="6" id="np"/>
        <Label text="Find numberpicker below" class="message" textWrap="true"/>
    </StackLayout>
    </Page>


    //how to retrive value set from view
    import numberpicker = require("nativescript-numberpicker");
    let np = <numberpicker.NumberPicker>page.getViewById("np");
    let value = np.value; //retrive value from view


Usage in code

    //adding numberpicker from code
    import numberpicker = require("nativescript-numberpicker");
    let np = new numberpicker.NumberPicker();
    np.minValue = 0;
    np.maxValue = 10;
    np.value = 3;//this should be set after maxValue and minValue has been provided

    //add numberpicker to your layout
    let layout = page.getViewById("Mycontainer");
    layout.addChild(np);

Support

Works on android and ios.

note: ios not tested yet, but it should work fine ;) not all of us use a mac.. lol

Issues and features request

Just create an issue and i'll get back to you ASAP

Pull request

yes, yes, yes, send them...keep them coming

Coming soon

styling support for ios and android

Liscence

MIT

Keywords

FAQs

Last updated on 14 Oct 2016

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