Zebble
  • About Zebble
  • Compare
  • Documentation
  • Themes
  • Plug-ins
  • Contact Us

    • What is Zebble?
    • Structure of a Zebble solution
    • Zebble Designer (UWP)
    • Installing - Introduction
    • Change log
    • Introduction
    • ViewModel development
    • VM.EXE
    • View development
    • Dialogs
    • Lists and Collections
    • Tips and shortcuts
    • List views
    • ViewModel testing
    • Automatic Views
    • View development process
    • Hello World - Core Concepts
    • Layout: Sizing & Positioning
    • Event handling
    • Navigation
    • Alerts, Dialog, Prompt and toast
    • View lifecycle
    • Managing Files & Resources
    • Config & Debugging
    • Forms
    • Page templates
    • Device API
    • Animations
    • Web Api - Part 1 (reading data)
    • Web Api - Part 2 (post and delete)
    • Web Api - Part 3 (server vs client domain model)
    • Gesture events
    • View class
    • Zebble Markup (.zbl files)
    • Data Binding and MVVM
    • Stack class
    • Sizing and positioning
    • Layout examples
    • ScrollView class
    • Page class
    • Styling in Zebble
    • CSS property mapping to Zebble
    • Supported selectors
    • Zebble CSS: Under the hood
    • Inline styling
    • CSS real-time updates
    • Dynamic expressions in CSS
    • Gradient background colours
    • CSS Pseudo-classes support
    • Using Bold and Light Fonts in Zebble
    • Rotation in Zebble
    • Using custom fonts in Zebble
    • Flashing on tap using AutoFlash
    • Button
    • Carousel class
    • Checkbox class
    • DatePicker
    • Drawing class
    • FilePicker class
    • Grid class
    • IconButton class
    • ImageView
    • ItemPicker class
    • ListView & Grid classes
    • OptionsList
    • SearchInput class
    • Slider class
    • Switch class
    • Tabs Class
    • TextInput class
    • TextView
    • TimePicker
    • TreeView
    • Waiting Indicator
    • WebView class (displaying html)
    • C# Methods and Properties Of UI Components
    • Nav.Forward() vs Nav.Go()
    • Passing parameters to the destination page
    • Going Back
    • Showing Popup pages
    • Waiting class
    • Hardware Back button (e.g. Android)
    • NavigationBar class
    • Tabs class
    • Caching (pages)
    • Navigation without event handler
    • Use the Windows version
    • Logging messages for Debugging
    • Debugging Zebble/Plugin
    • Exception handling in Zebble
    • Debugging layout and styles
    • Zebble Device API
    • Device.Screen and orientation (landscape | portrait)
    • Code that should run on a specific platform
    • Using Lamp (aka Flash, LED and Torch)
    • Using Compass (Smooth compass)
    • Using Accelerometer (device angle)
    • Using Gyroscope (device motion speed)
    • How to Vibrate the device?
    • Launching the device browser
    • Finding device model and manufacturer
    • Responding to System events
    • Handling device shake event
    • Permissions
    • Permissions declaration (manifest files)
    • Sharing
    • Prompt for rating the app
    • Finding if Internet connection is available
    • Device messaging (Make a phone call, send SMS or Email)
    • Showing a local notification
    • Copying to Clipboard
    • Accessing device contacts
    • Reading and writing into Gallery (albums)
    • Playing & Recording Audio
    • Cache and temp files and folders
    • C# async / await
    • Understanding Zebble Threading
    • Debugging - the StackTrace problem
    • Not awaiting (running in parallel)
    • Timer (interval / scheduled running)
    • Post-render changes to the UI (dynamic)
    • Introduction of Geo location
    • Map & Location Services
    • Launch directions to a location (external)
    • Getting current Location
    • Tracking user location
    • Device.Media: Taking and picking photos
    • Playing an audio file
    • VideoPlayer class
    • Augmented reality
    • Recording audio
    • Virtual Reality
    • Speech Recognition
    • Recording or picking video
    • Playing remote videos in iOS
    • Text to speech
    • Introduction to the importance of Mobile Testing
    • Why and what to test
    • Testing mobile apps on different devices
    • Testing mobile apps
    • Xamarin Profiler
    • Performance optimization
    • Moving a view to another container at run-time
    • Attaching custom data (tag) to objects
    • Saving a view as image
    • Naming best practices
    • Fastest way to update your nuget package
    • Tips for Clean and Brief code
    • Splash screen and icon generation
    • Advice for passing Approval
    • Options for iOS app distribution
    • Test Release (internal and UAT)
    • Application Icons in IOS
    • Submitting to App Store
    • Releasing to App Store
    • Crash reporting
    • Optimized Release Build
    • Android - Generating an APK for manual installation
    • Payment (subscriptions & in-app purchases)
    • Introduction to push notifications
    • Registration process (App)
    • Push notification setup - iOS
    • Push notification setup - Android
    • Push notification setup - Windows
    • Sending a push message from the web app
    • Introduction
    • Connecting Zebble to Web API
    • Installation
    • Creating an API class
    • GET APIs
    • Calling a GET API (in the mobile app)
    • POST, PUT, PATCH and DELETE APIs
    • Domain Model
    • Web API and Authentication
    • Versioning
    • Uniquely identifying installations (token)
    • Settings file: config.xml
    • Standard Zebble settings
    • Login/Register with Facebook
    • Creating a composite component / plugin
    • Creating a Zebble component using Html and Javascript
    • CustomRenderedView: Third-party native components / plugins
    • Mapbox
    • Naming considerations
    • Random problems?
    • Display Keyboard for Visual Studio Android Emulator
    • iOS goes mad?
    • Configuring a Windows phone for ad-hoc testing
    • Fixing Error DEP0001 : Unexpected Error: -2147009287 while deploying Windows UWP app on device
    • Fixing Error DEP0001 : Unexpected Error: -1988945906 while deploying Windows UWP app on device
    • Unable tp Connect to the Mac agent from Visual Studio
    • Can't connect to the Mac agent from Visual Studio?
    • Choosing the CPU architecture
    • Zebble CLI
    • How to add a Device API to Zebble source?
    • About Automated UI testing
    • What should we test in mobile applications?
    • Creating an Automated UI Test in Zebble



DatePicker


Date Picker is a component that allows the user to select a date. 

To use this component, install the Zebble.DateTimePicker nuget package. 
It's open source and available on GitHub. Also we welcome any contributions to enhace it.

Basic usage:

<DatePicker Id="MyDatePicker" />

 

It is initially displayed similar to a drop-down list control, showing the currently selected date (or the placeholder text). When the user taps it, it will then open a dialog to show day, month and year selection controls.

 

 

 

 

 

 

 

 

 

AllowNull

It is a boolean property that determines whether user can select nothing or not. The default value is false.

When this property is set to true, after selecting a date, in the next selection, the Cancel button is changed to Remove.

 

 

 

 

Box Shadow

MarkUp:

<DatePicker Style.BoxShadow.Color ="red" Style.BoxShadow.BlurRadius="15" Style.BoxShadow.XOffset="5" Style.BoxShadow.YOffset="5" Style.Border="1"/>

DayFormat

You can define the text representation of the day value of DatePicker by setting DayFormat property. it is a standard day format string uses a single format specifier. For example, if you want to show Short date pattern in the datepicker(6/15/2009), you should set DayFormat property to "d", or if you want to show Long date pattern in the datepicker (Monday, June 15, 2009), you should set DayFormat property to "D".

In case you want to change how a date picker show the date format you can use the following.

<DatePicker Id="MyDatePicker"   DayFormat="D" />

 

 

 

 

 

 

 

<DatePicker Id="MyDatePicker"   DayFormat="d" />

 

 

 

 

 

To see all supported standard .NET date formats see this link.

MonthFormat

In case you want to change how a date picker show the date format you can use the following.

<DatePicker Id="MyDatePicker"  MonthFormat = "MM" />

 

 

 

 

 

 

 

<DatePicker Id="MyDatePicker"  MonthFormat = "MMM" />

 

 

 

 

 

 

 

<DatePicker Id="MyDatePicker"  MonthFormat = "MMMM" />

 

 

 

 

 

To see all supported standard .NET date formats see this link.

TextFormat

In case you want to change how a date picker show the date format you can use the following.

<DatePicker Id="MyDatePicker"   TextFormat="dd/MM/yyyy" />

 

<DatePicker Id="MyDatePicker"   TextFormat="dd/M/yyyy" />As you can see, when we use "...MM..." format, the number of month digit is 2, but when "...M..." format is used, the number of month digit is 1. The day format is same.

To see all supported standard .NET date formats see this link.

Enabled & Ignored

Stylesheet has a boolean property named Ignored, which is false by default. When set to true it works the same as "display: none" in HTML. It means that the element will not only be invisible, but also it won't occupy space on the screen.

View has a boolean property named Enabled, which is true by default. When set to false the object will not respond to UI gesture events. But it will remain visible. Also, its PseudoCssState will be set to "disabled" which allows you to specify a visual style for it in CSS.

MarkUp:<DatePicker BackgroundImageStretch="OriginalRatio" Style.Border="1"  BackgroundImagePath="Images/VS.jpg"/>
    <DatePicker BackgroundImageStretch="OriginalRatio" Style.Border="1" BackgroundImagePath="Images/VS.jpg" Enabled="false" />
    <DatePicker BackgroundImageStretch="OriginalRatio" Style.Border="1" BackgroundImagePath="Images/VS.jpg" Visible="false"/>
    <DatePicker BackgroundImageStretch="OriginalRatio" Style.Border="1" BackgroundImagePath="Images/VS.jpg" Ignored="true"/>
    <DatePicker BackgroundImageStretch="OriginalRatio" Style.Border="1" BackgroundImagePath="Images/VS.jpg"/>

Position

You can control the position of DatePicker by setting Style.X and Style.Y properties:

MarkUp:

<DatePicker BackgroundImageAlignment="Right" Style.Border="1" BackgroundImagePath="Images/zebble.png" Style.X="10" Style.Y="10" />

 

PlaceHolder

If the date has not been selected by the user, the PlaceHolder string is shown in the DatePicker box:

<DatePicker Placeholder="heloooo?"/>

Rotation

You can see some information about rotation in  Zebble here: http://zebble.net/docs/rotation-in-zebble

Margin & Padding

You can see some information about Margin & Padding in Zebble here: http://zebble.net/docs/margin-padding

YearFrom & YearTo

<DatePicker  YearFrom="2000" YearTo="2030"/>

The default value of YearFrom property is current year and the default value of YearTo is 2026. You can change them by YearFrom and YearTo property.

 

 

 

 

 

If you do nit set YearFrom value, user can not set previous years.

 

 

 

 

 

 

Events:

  • on-Flashed: Raised when the object is flashed.
  • on-Initialized: Raised when the object is created and rendered.
  • on-Initializing: Raised when the object is being created and rendered.
  • on-LongPressed: Raised when user clicked on the object for a long time.
  • on-PanFinished: Raised when user panned on the object.
  • on-Panning: Raised when user starts to pan on the object.
  • on-PreRendered: Raised when the object is not started to rendered before rendering.
  • on-SelectedValueChanged: Raised when the date of the datepicker was changed.
  • on-Swiped: Raised when user swiped on the object.
  • on-Tapped: Raised when user tapped on the object.



‹
Zebble is a product of Geeks Ltd , a software house based in London, UK. All rights are reserved.

Telephone: +44 (0)845 643 6229

Email: hello@zebble.net

Address: 66a London Road, Morden

Greater London, United Kingdom, SM4 5BE

Privacy Statement
Terms & Conditions
Contact Us