Timer for Angular and Ionic 2/3/4

Learn more
light
dark

Change the theme setting here

Timer - Countdown

Change demo
Countdown
Angular Countdown timer with start, stop, reset controls, wheel settings for year, month, day, hour, minute, second, fract. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { Component } from '@angular/core';
import { mobiscroll, MbscTimerOptions } from '@mobiscroll/angular';

mobiscroll.settings = {
    theme: '',
    lang: ''
};

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    timer: number;

    timerSettings: MbscTimerOptions = {
        display: 'inline',
        targetTime: 10,
        maxWheel: 'minutes',
        minWidth: 100,
        onFinish: () => {
            mobiscroll.alert({
                title: 'Countdown finished',
                message: 'Yup, that\'s right, time\'s up. <br> Restart it by setting a new time.'

            });
        }
    };
}
<mbsc-form>
    <mbsc-form-group>
        <mbsc-form-group-title>Embedded countdown</mbsc-form-group-title>
        <div [(ngModel)]="timer" mbsc-timer [mbsc-options]="timerSettings"></div>
    </mbsc-form-group>
</mbsc-form>
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MbscModule } from '@mobiscroll/angular';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MbscModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    HttpClientJsonpModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Timer - Stopwatch

Change demo
Stopwatch
Angular Stopwatch demo with start, stop controls and lap counter. Change the steps and display wheels. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { Component } from '@angular/core';
import { MbscTimerOptions } from '@mobiscroll/angular';

let lapsNr = 1;

function format(ms) {
    const minutes = Math.floor(ms / (1000 * 60));
    const seconds = Math.floor((ms - minutes * 1000 * 60) / 1000);
    const fract = Math.floor((ms - minutes * 1000 * 60 - seconds * 1000) / 10);

    return minutes + 'm ' + (seconds < 10 ? '0' : '') + seconds + 's.' + (fract < 10 ? '0' : '') + fract;
}

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    timer: number;
    timerSettings: MbscTimerOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        step: 0.01,
        rows: 3,
        mode: 'stopwatch',
        onReset: () => {
            document.getElementById('laps').innerHTML = '';
            lapsNr = 1;
        },
        onLap: (event, inst) => {
            const cont = document.getElementById('laps');
            const temp = document.createElement('tr');

            temp.innerHTML = '<td>#' + lapsNr + '</td><td> - ' + format(event.lap) + ' - </td><td>' + format(event.ellapsed) + '</td>';
            cont.appendChild(temp);

            lapsNr++;
        }
    };
}
<div [(ngModel)]="timer" mbsc-timer [mbsc-options]="timerSettings"></div>
<table id="laps"></table>
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MbscModule } from '@mobiscroll/angular';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MbscModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    HttpClientJsonpModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Timer - Event handlers

Change demo
Event handlers
Angular Timer demo with event hooks for custom integration and functionality. For Angular 2/4/5/6/7 and Ionic 2/3/4.
Clear event log
EVENTS FIRED: 
import { Component } from '@angular/core';
import { MbscTimerOptions } from '@mobiscroll/angular';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    timer: number;

    timerSettings: MbscTimerOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        mode: 'stopwatch',
        onLap: (event, inst) => {
            // Your custom event handler goes here
        },
        onInit: (event, inst) => {
            // Your custom event handler goes here
        },
        onMarkupReady: (event, inst) => {
            // Your custom event handler goes here
        },
        onBeforeShow: (event, inst) => {
            // Your custom event handler goes here
        },
        onPosition: (event, inst) => {
            // Your custom event handler goes here
        },
        onShow: (event, inst) => {
            // Your custom event handler goes here
        },
        onSet: (event, inst) => {
            // Your custom event handler goes here
        },
        onStart: (event, inst) => {
            // Your custom event handler goes here
        },
        onStop: (event, inst) => {
            // Your custom event handler goes here
        },
        onFinish: (event, inst) => {
            // Your custom event handler goes here
        },
        onReset: (event, inst) => {
            // Your custom event handler goes here
        },
        onItemTap: (event, inst) => {
            // Your custom event handler goes here
        },
        onDestroy: (event, inst) => {
            // Your custom event handler goes here
        },
        onClose: (event, inst) => {
            // Your custom event handler goes here
        },
        onChange: (event, inst) => {
            // Your custom event handler goes here
        },
        onCancel: (event, inst) => {
            // Your custom event handler goes here
        },
        onBeforeClose: (event, inst) => {
            // Your custom event handler goes here
        },
        onClear: (event, inst) => {
            // Your custom event handler goes here
        }
    };
}
<div [(ngModel)]="timer" mbsc-timer [mbsc-options]="timerSettings"></div>
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MbscModule } from '@mobiscroll/angular';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MbscModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    HttpClientJsonpModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Timer - Display modes

Change demo
Display modes
Angular Timer demo with top, bottom, popup, center, modal, bubble and inline embeddable display modes. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { Component } from '@angular/core';
import { mobiscroll, MbscTimerOptions } from '@mobiscroll/angular';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    timer: number;
    timerTop: number;
    timerCenter: number;
    timerBubble: number;
    timerInline: number;

    timerSettings: MbscTimerOptions = {
        display: 'bottom'
    };
    timerTopSettings: MbscTimerOptions = {
        display: 'top'
    };
    timerCenterSettings: MbscTimerOptions = {
        display: 'center'
    };
    timerBubbleSettings: MbscTimerOptions = {
        display: 'bubble'
    };
    timerInlineSettings: MbscTimerOptions = {
        display: 'inline',
        layout: 'liquid'
    };
}
<mbsc-form>
    <mbsc-form-group>
        <mbsc-form-group-title>Try different display modes</mbsc-form-group-title>
        <mbsc-timer [(ngModel)]="timer" [options]="timerSettings" placeholder="Please select...">Bottom</mbsc-timer>
        <mbsc-timer [(ngModel)]="timerTop" [options]="timerTopSettings" placeholder="Please select...">Top</mbsc-timer>
        <mbsc-timer [(ngModel)]="timerCenter" [options]="timerCenterSettings" placeholder="Please select...">Center</mbsc-timer>
        <mbsc-timer [(ngModel)]="timerBubble" [options]="timerBubbleSettings" placeholder="Please select...">Bubble</mbsc-timer>
    </mbsc-form-group>
    <mbsc-form-group class="mbsc-padding">
        <p class="mbsc-thin">With inline display you can embed the Timer component in almost any markup or form.</p>
    </mbsc-form-group>
    <mbsc-form-group>
        <mbsc-form-group-title>Embedded timer scroller</mbsc-form-group-title>
        <mbsc-timer [(ngModel)]="timerInline" [options]="timerInlineSettings" type="hidden"></mbsc-timer>
    </mbsc-form-group>
</mbsc-form>
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MbscModule } from '@mobiscroll/angular';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MbscModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    HttpClientJsonpModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Timer - Theming capabilities

Change demo
Theming capabilities
Angular Timer control with iOS, Material, Windows look & feel. Customize colors and styling with theme builder. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { Component } from '@angular/core';
import { mobiscroll, MbscTimerOptions } from '@mobiscroll/angular';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    iosDemo: number;
    iosDarkDemo: number;
    iosCustomDemo: number;
    materialDemo: number;
    materialDarkDemo: number;
    materialCustomDemo: number;
    windowsDemo: number;
    windowsDarkDemo: number;
    windowsCustomDemo: number;
    mobiscrollDemo: number;
    mobiscrollDarkDemo: number;
    mobiscrollCustomDemo: number;

    iosSettings: MbscTimerOptions = {
        theme: 'ios',
        display: 'bubble',
        touchUi: false
    };
    iosDarkSettings: MbscTimerOptions = {
        theme: 'ios-dark',
        display: 'bubble',
        touchUi: false
    };
    iosCustomSettings: MbscTimerOptions = {
        theme: 'ios-gray',
        display: 'bubble',
        touchUi: false
    };
    materialSettings: MbscTimerOptions = {
        theme: 'material',
        display: 'bubble',
        touchUi: false
    };
    materialDarkSettings: MbscTimerOptions = {
        theme: 'material-dark',
        display: 'bubble',
        touchUi: false
    };
    materialCustomSettings: MbscTimerOptions = {
        theme: 'material-indigo',
        display: 'bubble',
        touchUi: false
    };
    windowsSettings: MbscTimerOptions = {
        theme: 'windows',
        display: 'bubble',
        touchUi: false
    };
    windowsDarkSettings: MbscTimerOptions = {
        theme: 'windows-dark',
        display: 'bubble',
        touchUi: false
    };
    windowsCustomSettings: MbscTimerOptions = {
        theme: 'windows-yellow',
        display: 'bubble',
        touchUi: false
    };
    mobiscrollSettings: MbscTimerOptions = {
        theme: 'mobiscroll',
        display: 'bubble',
        touchUi: false
    };
    mobiscrollDarkSettings: MbscTimerOptions = {
        theme: 'mobiscroll-dark',
        display: 'bubble',
        touchUi: false
    };
    mobiscrollCustomSettings: MbscTimerOptions = {
        theme: 'mobiscroll-lime',
        display: 'bubble',
        touchUi: false
    };
}
<mbsc-form>
    <div class="mbsc-grid mbsc-grid-fixed">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <mbsc-form-group inset>
                    <mbsc-form-group-title>iOS Theme</mbsc-form-group-title>
                    <label>
                        Light
                        <input [(ngModel)]="iosDemo" mbsc-timer [mbsc-options]="iosSettings" placeholder="Please Select..." />
                    </label>
                    <label>
                        Dark
                        <input [(ngModel)]="iosDarkDemo" mbsc-timer [mbsc-options]="iosDarkSettings" placeholder="Please Select..." />
                    </label>
                    <label>
                        Custom
                        <input [(ngModel)]="iosCustomDemo" mbsc-timer [mbsc-options]="iosCustomSettings" placeholder="Please Select..." />
                    </label>
                </mbsc-form-group>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <mbsc-form-group inset>
                    <mbsc-form-group-title>Material Theme</mbsc-form-group-title>
                    <label>
                        Light
                        <input [(ngModel)]="materialDemo" mbsc-timer [mbsc-options]="materialSettings" placeholder="Please Select..." />
                    </label>
                    <label>
                        Dark
                        <input [(ngModel)]="materialDarkDemo" mbsc-timer [mbsc-options]="materialDarkSettings" placeholder="Please Select..." />
                    </label>
                    <label>
                        Custom
                        <input [(ngModel)]="materialCustomDemo" mbsc-timer [mbsc-options]="materialCustomSettings" placeholder="Please Select..." />
                    </label>
                </mbsc-form-group>
            </div>
        </div>
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <mbsc-form-group inset>
                    <mbsc-form-group-title>Windows Theme</mbsc-form-group-title>
                    <label>
                        Light
                        <input [(ngModel)]="windowsDemo" mbsc-timer [mbsc-options]="windowsSettings" placeholder="Please Select..." />
                    </label>
                    <label>
                        Dark
                        <input [(ngModel)]="windowsDarkDemo" mbsc-timer [mbsc-options]="windowsDarkSettings" placeholder="Please Select..." />
                    </label>
                    <label>
                        Custom
                        <input [(ngModel)]="windowsCustomDemo" mbsc-timer [mbsc-options]="windowsCustomSettings" placeholder="Please Select..." />
                    </label>
                </mbsc-form-group>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-6">
                <mbsc-form-group inset>
                    <mbsc-form-group-title>Mobiscroll Theme</mbsc-form-group-title>
                    <label>
                        Light
                        <input [(ngModel)]="mobiscrollDemo" mbsc-timer [mbsc-options]="mobiscrollSettings" placeholder="Please Select..." />
                    </label>
                    <label>
                        Dark
                        <input [(ngModel)]="mobiscrollDarkDemo" mbsc-timer [mbsc-options]="mobiscrollDarkSettings" placeholder="Please Select..." />
                    </label>
                    <label>
                        Custom
                        <input [(ngModel)]="mobiscrollCustomDemo" mbsc-timer [mbsc-options]="mobiscrollCustomSettings" placeholder="Please Select..." />
                    </label>
                </mbsc-form-group>
            </div>
        </div>
    </div>
</mbsc-form>
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MbscModule } from '@mobiscroll/angular';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MbscModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    HttpClientJsonpModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Looking for something you didn't see or have a sales question?
Ask us about it, we're here to help.

Component license


Purchase component licenses if you are looking for specific funcionality.

Total


All features will be included with the license.

Buy component license

Framework license


Get all 36 components, including with the Framework license.



Mobiscroll for Angular & Ionic $595


Use Javascript when building with plain and simple JS. Use jQuery when you have jQuery already included or if you are building with jQuery Mobile. Use AngularJS when building with Angular 1.x or Ionic 1. Use Angular when building with Angular 2/4/5/6/7 or Ionic 2/3/4. Use it when you are building your app or website with React.


Buy framework license
See other licensing options

Framework license


Get all 36 components, including with the Framework license.



Mobiscroll for Angular $595


  • Use it when building with plain and simple JS
  • Compatible with vanilla JS app or frameworks like Vue
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with jQuery and jQuery Mobile
  • Enjoy the familiar API if you already use jQuery
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular JS and Ionic 1
  • For web and mobile apps based on Angular 1.x
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular 2/4/5/6/7 and Ionic 2/3/4
  • Visual Studio and VS Code integration
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it when building with React JS
  • Collection of UI components for web and mobile
  • Royalty-free commercial usage
  • Technical support is included with the license
Buy framework license
See other licensing options

Framework license


Select the development framework you are using. Get all 36 components with the license.

Mobiscroll for Javascript
Mobiscroll for jQuery
Mobiscroll for React
Mobiscroll for Angular
Mobiscroll for Angular JS
  • Use it when building with plain and simple JS
  • Compatible with vanilla JS app or frameworks like Vue
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with jQuery and jQuery Mobile
  • Enjoy the familiar API if you already use jQuery
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular JS and Ionic 1
  • For web and mobile apps based on Angular 1.x
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular 2/4/5/6/7 and Ionic 2/3/4
  • Visual Studio and VS Code integration
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it when building with React JS
  • Collection of UI components for web and mobile
  • Royalty-free commercial usage
  • Technical support is included with the license
Buy framework license
See other licensing options

Select the framework you are interested in

Javascript
jQuery
Angular
Angular JS
React

Use Javascript when building with plain and simple JS.

Use jQuery when you have jQuery already included or if you are building with jQuery Mobile.

Use AngularJS when building with Angular 1.x or Ionic 1.

Use Angular when building with Angular 2/4/5/6/7 or Ionic 2/3/4.

Use it when you are building your app or website with React.

Do you need additional support seats?

The framework license comes with one support seat. ( +$50/seat )

Add the source code?

Price
Buy now
Customize & try demos locally
Sign in or start your free trial

What framework are you using?

Javascript
jQuery
AngularJS
Angular
Ionic
React
Other
Select a framework
Email address

Customize & try this demo locally
Sign in or start your free trial

We have to set you up with a trial for this to run 👍

Email address

Customize & try demos locally
You can download and use Mobiscroll for Free

What framework are you using?

Javascript
jQuery
AngularJS
Angular
Ionic
React
Other
Select a framework
Install demo in your app
Follow this quick, two minute install guide
Close window

Step 1.Install the Mobiscroll CLI from npm

Copy command
$ npm install -g @mobiscroll/cli

The CLI makes configuring your apps super simple 👍

Step 2.Run the following command in the root folder of your Ionic project

Copy command
$ mobiscroll config ionic
$ mobiscroll config ionic --lite

You will be prompted to log in with your mobiscroll account. Set your password here

Create an Ionic 3 & Mobiscroll starter with the CLI:

$ mobiscroll start ionic myStarter

Run this command for Ionic 4 & Mobiscroll starter:

$ mobiscroll start ionic-angular myStarter

Step 3.Copy the code into your app.

Copy TS
Copy HTML
Copy CSS
Copy Module

Step 4.Run ionic serve in the root folder of your app 🎉

Copy command
$ ionic serve

And voilà, everything should be running smoothly.

Customize & try demos locally
How would you like to do it?
Install demo in your app
Follow this quick, two minute install guide
Close window

Step 1.Install the Mobiscroll CLI from npm

Copy command
$ npm install -g @mobiscroll/cli

The CLI makes configuring your apps super simple 👍

Step 2.Run the following command in the root folder of your Angular project

Copy command
$ mobiscroll config angular
$ mobiscroll config angular --lite

You will be prompted to log in with your mobiscroll account. Set your password here

Step 3.Copy the code into your app. HTML goes into the markup, TS into Typescript.

Copy TS
Copy HTML
Copy CSS
Copy Module

Step 4.Run ng serve in the root folder of your app 🎉

Copy command
$ ng serve

And voilà, everything should be running smoothly.

Thanks for downloading
Try and customize the app locally

Extract the zip file and run the project like any Ionic app. Make sure to have Ionic CLI installed and open the terminal in the app root folder.

Step 1. Run in root folder
$ npm install
Step 2. Start the app
$ ionic serve

Let us know if we can help and enjoy!

Change your password
Need to update your password? Enter and hit the button below

You are setting a password for the account

New Password Required Enter at least 6 characters
Change your password
Need to update your password? Enter and hit the button below

Your password has been changed!

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

We have set up a trial so that you can try the demos locally.

Extract the zip file and open the demo in your favorite browser. To install Mobiscroll in your project follow instructions from this page.


Let us know if we can help and enjoy! 👍

Thanks for downloading
Customize demos locally

Please extract the zip file and run the project like any Angular CLI app. Make sure to have the Angular CLI installed.

For installation and usage, extract the zip file and open a terminal window and follow these steps.

Step 1. Run in root folder
$ npm install
Step 2. Start the app
$ ng serve --open

Let us know if we can help and enjoy! 👍

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

We have set up a trial so that you can try the demos locally.

The easiest way to get started is to follow the installation steps and by grabbing the code directly from the demo page. Let us know if we can help and enjoy!

You'll find a fully functional Kitchen-sink Ionic app in the zip file.

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

We have set up a trial so that you can try the demos locally.

The demos are using Babel's in-browser ES6 and JSX transformer. Extract the zip file and open the demo in your browser. To install Mobiscroll in your project follow instructions from this page.


Let us know if we can help and enjoy! 👍

Demos
Alerts & notifications
Alert Notifications Note
Components
Alerts & notifications 3
Buttons 4
Calendar 27
Cards 14
Collapsible 3
Color 10
Date & Time 20
Event Calendar 25
Forms 6
Grid layout 7
Image 7
Inputs & fields 6
Listview 18
Measurement 10
Navigation 8
Number 8
Numpad 13
Option List 4
Popup 10
Range 19
Scroller 7
Scrollview 5
Select 18
Slider & progress 4
Styling 6
Timer 5
Timespan 6
Toggle & Radio 4
Treelist 7
Theme Select
Mobiscroll
Mobiscroll Dark
Material
Material Dark
iOS
iOS Dark
Bootstrap
Windows
Windows Dark
Display Mode
Language Locale
See other demos and change options
Theme
Display
Locale
See other demos