Enhanced Yii2 wrapper for the bootstrap timepicker plugin

Overview

Krajee Logo
yii2-widget-timepicker
Donate       kartikv

Stable Version Untable Version License Total Downloads Monthly Downloads Daily Downloads

The TimePicker widget allows you to easily select a time for a text input using your mouse or keyboards arrow keys. The widget is a wrapper enhancement of the TimePicker plugin by rendom forked from jdewit's TimePicker. This widget as used here has been specially enhanced for Yii framework 2.0 and Bootstrap 3. With release v1.0.4, the extension has been enhanced to support Bootstrap 4.x version.

NOTE: This extension is a sub repo split of yii2-widgets. The split has been done since 08-Nov-2014 to allow developers to install this specific widget in isolation if needed. One can also use the extension the previous way with the whole suite of yii2-widgets.

Installation

The preferred way to install this extension is through composer. Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json.

To install, either run

$ php composer.phar require kartik-v/yii2-widget-timepicker "*"

or add

"kartik-v/yii2-widget-timepicker": "*"

to the require section of your composer.json file.

Release Changes

NOTE: Refer the CHANGE LOG for details on changes to various releases.

Demo

You can refer detailed documentation and demos on usage of the extension.

Usage

use kartik\time\TimePicker;

// usage without model
echo '';
echo TimePicker::widget([
    'name' => 'start_time', 
    'value' => '11:24 AM',
    'pluginOptions' => [
        'showSeconds' => true
    ]
]);

License

yii2-widget-timepicker is released under the BSD-3-Clause License. See the bundled LICENSE.md for details.

Comments
  • Prevent timepicker plugin triggering change on init

    Prevent timepicker plugin triggering change on init

    This change on init by the timepicker plugin causes undesirable effects in using this plugin as a filter in yii2-grid (triggers infinite loop on init and refreshes the grid)... as well as using it as an Editable Plugin kartik-v/yii2-editable#143.

    enhancement 
    opened by kartik-v 6
  • TimePicker: focus on tab should go to hours not to last elements

    TimePicker: focus on tab should go to hours not to last elements

    When a user uses the keyboard tab to switch between inputs (or simply the input gets the focus), when there's a value in the TimePicker, the selection is on last element (AM, seconds or whatever is configured).

    If I tab (and focus the input), the selected element should be the first one or at least the whole value. As I can see this is an issue of the javascript part, though the original author hasn't fixed an issue since a long time. I might try to fix this but first would like to know if it's a legitimate behaviour.

    wontfix 
    opened by tsdogs 5
  • show Meridian not convert 24 hours format correctly

    show Meridian not convert 24 hours format correctly

    I have used kartik timepicker widget in my project as below.

         <?= $form->field($model, 'end_time')->widget(TimePicker::classname(), [
                'pluginOptions' =>
                [
                    'defaultTime' => $time_now,
                    'showMeridian' => true,
                ],
    
                ]);
            ?> 
    

    but if pass time like 14:15 to the widget it shows time as 12:15 AM

    wontfix 
    opened by rumes 5
  • Visualization problme when  used in TabularForm

    Visualization problme when used in TabularForm

    When used in tabular form it render behind the footer of the grid. The div that contain the rows show scrollbars and the only way to visualize the widget is to scroll with the mouse wheel. schermata1 I think is a problem with this widget since the datetimepicker do not have this issue as it render above the footer, outside rows container.

    wontfix 
    opened by bobonov 4
  • Timepicker behavior vs DatePicker & DateTimePicker

    Timepicker behavior vs DatePicker & DateTimePicker

    Prerequisites

    • [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
    • [x] The issue still exists against the latest master branch of yii2-widget-timepicker.
    • [x] This is not an usage question. I confirm having gone through and read the documentation and demos.
    • [x] This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
    • [x] I have attempted to find the simplest possible steps to reproduce the issue.
    • [ ] I have included a failing test as a pull request (Optional).

    Steps to reproduce the issue

    If you use the DatePicker, or the DateTimePicker, when you click on the input, the date/datetime picker pops open, when you click on the input for the TimePicker it does not.

    http://demos.krajee.com/widget-details/datepicker#markup-comp-pre

    Compared to

    http://demos.krajee.com/widget-details/timepicker#basic-usage http://demos.krajee.com/widget-details/datetimepicker#markup-input

    Expected behavior and actual behavior

    I was expecting... The TimePicker to behave similarly as the other widgets that are picking a date, time, date time.

    Environment

    Browsers

    • [x] Google Chrome
    • [ ] Mozilla Firefox
    • [ ] Internet Explorer
    • [ ] Safari

    Operating System

    • [ ] Windows
    • [x] Mac OS X
    • [ ] Linux
    • [ ] Mobile

    Libraries

    • jQuery version:
    • yii2-widget-timepicker version:

    Isolating the problem

    • [x] This bug happens on the demos page
    • [ ] The bug happens consistently across all tested browsers
    • [ ] This bug happens when using yii2-widget-timepicker without other plugins.
    wontfix 
    opened by craiglondon 3
  • Increment hours to 00:00 - fix

    Increment hours to 00:00 - fix

    This bug happens on demo page. Video: https://gyazo.com/4aa4652d2024effa0fbf3f409f2a60ce

    Scope

    This pull request includes a

    • [x] Bug fix
    • [ ] New feature
    • [ ] Translation

    Related Issues

    https://github.com/kartik-v/yii2-widget-timepicker/issues/13

    wontfix 
    opened by alnidok 2
  • Duration picker support

    Duration picker support

    opened by msankar1991 2
  • Inline TimePicker Widget

    Inline TimePicker Widget

    Is it possible to display the TimePicker-Widget inline? Especially for mobile applications/webpages it would be very nice if I don't have to press the time-button for the widget to appear.

    timepicker

    question 
    opened by Scentyoo 2
  • Increment hours to 00:00

    Increment hours to 00:00

    When trying to increase hours value from 23:00 to 00:00 it does not. Using plugin with disabled meridian. Trying on demo krajee website, also doesn't work.

    wontfix 
    opened by YuriyKvit 1
  • showMeridian => false returns always empty value

    showMeridian => false returns always empty value

    Hi

    I'm using Timepicker in my yii2 application as follows:

        'time' => [
            'type' => TabularForm::INPUT_WIDGET,
            'widgetClass' => \kartik\datecontrol\DateControl::classname(),
            'options' => [
                'type' => \kartik\datecontrol\DateControl::FORMAT_TIME,
                'saveFormat' => 'php:H:i:s',
                'ajaxConversion' => true,
                'options' => [
                    'pluginOptions' => [
                        'placeholder' => Yii::t('app', 'Choose Time'),
                        'autoclose' => true,
                        'showSeconds' => true,
                        'showMeridian' => false,
                        'minuteStep' => 1,
                        'secondStep' => 5,
                    ]
                ]
            ]
        ],
    

    As mentioned the problem is "showMeridian". Everything works fine, when it is set to true (the default value), but when I turn it to false, the hidden input field containing the time value is not going to be updated and so the returned time is always an empty string "".

    wontfix 
    opened by lupoalberto 1
  • Datepicker broken from Timepicker

    Datepicker broken from Timepicker

    opened by Richie1710 1
Releases(v1.0.5)
Owner
Kartik Visweswaran
Kartik Visweswaran
Initiated by me, enhanced by us, created for us. This is the fork (public) version separated from my private diary repository.

diary public repository Initiated by me, enhanced by us, created for us. This is the fork (public) version separated from my private diary repository.

Weicheng Ao 3 Jul 30, 2022
yii2 MinIO

yii2-minio Yii2 MinIO Installation php composer.phar require bevin1984/yii2-minio:^0.0.1 Or "bevin1984/yii2-minio": "^0.0.1" Configuration 'components

Bevin 8 Dec 2, 2022
A plugin manager for PocketMine-MP downloads plugin from PocketMine-MP official plugin repository

oh-my-pmmp A plugin manager for PocketMine-MP Getting Started Prerequisites Your server MUST RUN the latest version of PocketMine. Installation From P

thebigcrafter 6 Jan 4, 2023
Integrates the ClassicPress Plugin Directory and any plugin stored in GitHub (tagged with classicpress-plugin) in the ClassicPress Admin

ClassicPress Plugin Directory Adds a new screen in a ClassicPress Install where you can browse, install, activate, deactivate, update, delete and pagi

TukuToi 3 Dec 27, 2022
Uma loja virtual de teclados feita nas aulas de PW-II na ETEC com PHP e bootstrap

etec-tectok-teclados Uma loja virtual de teclados feita nas aulas de PW-II na ETEC com PHP e bootstrap Translations: ???? English tectok.herokuapp.com

Luis Felipe Santos do Nascimento 5 May 3, 2022
The package contains a bootstrap for running Yii3 console application.

Yii Console Runner The package contains a bootstrap for running Yii3 console application. Requirements PHP 8.0 or higher. Installation The package cou

Yii Software 4 Oct 15, 2022
Inventory manager - Light Bootstrap Dashboard

Light Bootstrap Dashboard is an admin dashboard template designed to be beautiful and simple. It is built on top of Bootstra

Ranaivonampoizina Mikajy 1 Nov 17, 2021
Formulário de contato utilizando HTML, CSS, Bootstrap, PHP, Javascript e conexão ao banco de dados MySQL.

Formulário de Contato Tecnologias | Projeto | Licença | ?? Tecnologias Esse projeto foi desenvolvido com as seguintes tecnologias: HTML CSS PHP JavaSc

Douglas Duarte 3 Feb 10, 2022
Twitter Bootstrap base theme for Magento

Magento Bootstrap This is an adaption of the Twitter Bootstrap framework for the Magento Commerce system. PLEASE NOTE THIS IS A WORK IN PROGRESS Insta

Casper Valdemar Poulsen 84 Oct 31, 2022
HTML5 Twitter Bootstrap 3.1 Magento Boilerplate Template

Magento Boilerplate A HTML5 Twitter Bootstrap 3.1 Magento 1.8 Boilerplate Template Read the blog post or checkout the demo for more information. Insta

null 531 Dec 8, 2022
Laravel & Solana Phantom wallet example built with Bootstrap, JQuery. App connects to Phantom wallet and fetching publicKey and balance information.

Phantom Wallet Authentication Example Laravel & Solana ($SOL) Phantom wallet example built with Bootstrap, JQuery. This is a Web 3.0 app that connects

Solanacraft 3 Oct 19, 2022
Sample application to bookmark links, where interface build with Angular.js + Twitter Bootstrap and server powered by PHP with Slim Framework

RESTful Bookmarks PHP Slim TODO: review and update FrontEnd Sample application to bookmark links, where interface build with Angular.js + Twitter Boot

Erko Bridee 50 Dec 15, 2021
First SQL Project - HTML, Bootstrap, PHP enabling CRUD from web

DB-Project First SQL Project with HTML, Bootstrap, PHP enabling CRUD from web Java for mocking data, enabling .csv input Idea This model corresponds t

null 2 Jun 16, 2022
A research raw data repository for researchers of Arba Minch University built using Codeigniter which follows MVC architecture. The front-end is build using Bootstrap.

Arba Minch University Dataset Repository This system is a research dataset repository for Arba Minch University researchers and is build using Codeign

Wuletaw Wonte 8 Jul 1, 2022
Symfony Bundle to create HTML tables with bootstrap-table for Doctrine Entities.

HelloBootstrapTableBundle This Bundle provides simple bootstrap-table configuration for your Doctrine Entities. Used bootstrap-table version 1.18.3. I

Sebastian B 7 Nov 3, 2022
Laravel & MySQL, jQuery, Ajax, Bootstrap. Also, it's include email send function without any API.

Rewards-Dacor Laravel & MySQL, jQuery, Ajax, Bootstrap. Also, it's include email send function without any API. [Live site link] ( https://rewardsdaco

Professional Developer 13 Dec 26, 2022
A Simple MVC PHP Framework, integrated with lot of features such as Session, Cookies, Migrations, Database, Factories, Seeding, Bootstrap and Tailwind CSS

Navite A Simple MVC PHP Framework, integrated with lot of features such as Session, Cookies, Migrations, Database, Factories, Seeding, Bootstrap and T

Celionatti 2 Aug 22, 2022
Cadre is a free and open-source PHP staff management system that is built on Bootstrap and Core Boxx.

CADRE Cadre is a free and open-source PHP Staff Management System. Not the best in the world, but this simple portal has the basic features to help sm

Code Boxx 3 Sep 26, 2022
Sistema de login usando PHP, MySQL(PDO),HTML,CSS e bootstrap

sistemalogin link para entrar no projeto: https://williamsistema.000webhostapp.com/ Sistema de login usando PHP, MySQL(PDO),HTML,CSS e bootstrap Requi

William Lima Alves 4 Oct 7, 2022