beaten-sect0r / yii2-flatpickr Goto Github PK
View Code? Open in Web Editor NEWDatetime picker widget for Yii2 framework
License: BSD 3-Clause "New" or "Revised" License
Datetime picker widget for Yii2 framework
License: BSD 3-Clause "New" or "Revised" License
У flatpickr-a наряду с другими
https://chmln.github.io/flatpickr/plugins/
недавно вышел полезный RangeDate плагин
flatpickr/flatpickr#584 (comment)
Было бы очень удобно добавить поддержку плагинов в виджет.
Hi,
Thank you so much for this extension. Im trying to use rangePlugin with two input fields but it doesnt perform like the demo at
https://flatpickr.js.org/plugins/ (it removes date field when editing or changes start date when selecting end date)
Maybe rangePlugin.js should be updated?
<?= $form->field($model, "startDate", getFieldOptions('calendar-check', 'Select start date'))
->widget(FlatpickrWidget::class, [
'theme' =>'material_blue',
'plugins' => [
'rangePlugin' => [
'input'=> "#ios-enddate",
],
],
'locale' => [
'firstDayOfWeek' => 1,
],
'clientOptions' => [
'mode' => 'range',
],
'options' => [
'placeholder' => Yii::t('app', 'Enter').' '.$model->getAttributeLabel('startDate')
],
])->label(false); ?>
Thanks again
I am using flatpicker date picker in bootstrap modal.When i click on modal that date picker is coming ,but when we click on any date ,time ,sec or any place of the date picker then that date picker pop up is closed.
i am using flatpickr v4.4.4 js in yii2
I displaying datePicker in modal.When click on anywhere of the datepicker then datepicker is closed
Below is my yii2 Code.
echo $form->field($model, $updateFieldName)->widget(FlatpickrWidget::className(), [
'locale' => strtolower(substr(Yii::$app->language, 0, 2)),
'plugins'=> [
'minMaxTimePlugin'=>[
'table'=> [
$date[0] => [
'minTime' => $date[1]
]
]
]
],
'groupBtnShow' => true,
'options' => [
'class' => 'form-control',
],
'clientOptions' => [
/'allowInput' => true,/
'minDate' => $tripCreateTime,
'enableTime' => true,
'time_24hr' => true,
'dateFormat'=> "d-m-Y H:i:00",
'minuteIncrement'=>1,
],
]);
Thanks in advance.
after composer update dependency (flatpickr-callendar) not installed in /vendor/bower, but in /vendor/bower-asset
both folders are there in my case (bower and bower-asset).
so line in FlatPickrAsset.php:
public $sourcePath = '@bower/flatpickr-calendar/dist';
throws error. For now works if I change @bower to real path like /var/www/website/vendor/bower-asset
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.