Comments (35)
Hi comerc. I'm playing with it right now. :)
BTW, in case someone come here looking for version 3 available options, here they are:
$.fn.datetimepicker.defaults = {
pickDate: true, //en/disables the date picker
pickTime: true, //en/disables the time picker
useMinutes: true, //en/disables the minutes picker
useSeconds: true, //en/disables the seconds picker
useCurrent: true, //when true, picker will set the value to the current date/time
minuteStepping:1, //set the minute stepping
minDate:`1/1/1900`, //set a minimum date
maxDate: , //set a maximum date (defaults to today +100 years)
showToday: true, //shows the today indicator
language:'en', //sets language locale
defaultDate:"", //sets a default date, accepts js dates, strings and moment objects
disabledDates:[], //an array of dates that cannot be selected
enabledDates:[], //an array of dates that can be selected
icons = {
time: 'glyphicon glyphicon-time',
date: 'glyphicon glyphicon-calendar',
up: 'glyphicon glyphicon-chevron-up',
down: 'glyphicon glyphicon-chevron-down'
}
useStrict: false, //use "strict" when validating dates
sideBySide: false, //show the date and time picker side by side
daysOfWeekDisabled:[] //for example use daysOfWeekDisabled: [0,6] to disable weekends
};
from meteor-autoform-bs-datetimepicker.
I would think that would work.
from meteor-autoform-bs-datetimepicker.
Sorry, you are right, it works :) Maybe also worth mentioning in the docs because the docs currently only mention passing the dateTimePickerOptions as a helper function...
from meteor-autoform-bs-datetimepicker.
This doesn't work for me. I've added the option to dateTimePickerOptions: { }
but it's not accepting any of them. Any tip you would like to share?
Thanks in advance.
from meteor-autoform-bs-datetimepicker.
Could you share some code ?
from meteor-autoform-bs-datetimepicker.
Sure! Here it is: http://meteorpad.com/pad/e4cG3nWQCiSqgChPb/AutoForm-DateTimePicker
As you see, I'm adding options to the schema but nothing happens.
from meteor-autoform-bs-datetimepicker.
Seems I spoke too soon. Apparently, some options work and some don't. For example, I can't set the stepping option nor the language.
Anyhow, this is the case on the MeteorPad code I shared. On my own code, any of the options are working. On my code the Schema and Template look the same as in the MeteorPad sample. Any idea how can I troubleshoot it?
from meteor-autoform-bs-datetimepicker.
You are using the wrong options.
Use minuteStepping
instead of stepping
and language
instead of locale
from meteor-autoform-bs-datetimepicker.
The site http://eonasdan.github.io/bootstrap-datetimepicker/ is now displaying datetimepicker v4
but https://atmospherejs.com/tsega/bootstrap3-datetimepicker still uses datetimepicker v3
from meteor-autoform-bs-datetimepicker.
Oh! I see... Thanks! I'll keep that in mind.
Anyhow, the code on my end looks like the sample I sent and options are still not working, even if I use the v3 options. Any idea how can I troubleshoot it? Sorry for been so bothersome.
from meteor-autoform-bs-datetimepicker.
Were you able to find the docs for version 3?
from meteor-autoform-bs-datetimepicker.
Which options are not working? I just checked your Meteorpad and minuteStepping
is working as it should...
from meteor-autoform-bs-datetimepicker.
Nop. I'm just playing with options that work on MeteorPad but not on my code. For example calendarWeeks: true,
from meteor-autoform-bs-datetimepicker.
On my code, any of the options are working. Even the ones that are working on the MeteorPad sample.
from meteor-autoform-bs-datetimepicker.
Is calendarWeeks
a v3-option or a v4-option ?
from meteor-autoform-bs-datetimepicker.
Seems calendarWeeks
is working on both v3 and v4 since it's working on my sample code and it's on the documentation for v4.
from meteor-autoform-bs-datetimepicker.
You mean it is working on Meteorpad but not in your project ?
from meteor-autoform-bs-datetimepicker.
Exactly. And the code looks the same on both sides. I'm sure there must be a silly mistake somewhere but I can't figure it out.
from meteor-autoform-bs-datetimepicker.
I would say compare your package list versions...
from meteor-autoform-bs-datetimepicker.
Oh my! I told you I was sure it was a silly mistake. In case you are wondering, I was changing the option on the schema for a field but on the browser I was checking other Date field and not the one I was modifying. So silly! I think I need to get some rest and sleep.
Sorry for the time I made you spend.
BTW, Do you happen to have link to the v3 docs for datetimepicker?
Thanks!!
from meteor-autoform-bs-datetimepicker.
Shit happens ;) I couldn't find the v3 docs, I suggest you open a new issue on https://github.com/Eonasdan/bootstrap-datetimepicker requesting a link for the v3 docs or maybe ask https://github.com/tsega/meteor-bootstrap3-datetimepicker/ to update to version 4...
from meteor-autoform-bs-datetimepicker.
Will do! Thanks!
from meteor-autoform-bs-datetimepicker.
Welcome 👍
from meteor-autoform-bs-datetimepicker.
You may use V4 now: #7
I will make merge branches in the near future.
from meteor-autoform-bs-datetimepicker.
comerc, sorry for what I'm sure it's a newbie question. I don't have much experience with git.
After running git checkout v4beta
I'm getting: error: pathspec 'v4beta' did not match any file(s) known to git.
.
When I run git branch -a
I'm only getting the master
branch.
Am I missing something?
from meteor-autoform-bs-datetimepicker.
please use instruction:
$ meteor add comerc:bs-datetimepicker
$ cd packages
$ git clone https://github.com/comerc/meteor-autoform-bs-datetimepicker.git
$ git checkout v4beta
from meteor-autoform-bs-datetimepicker.
Yeap. That's what I did. I'm getting the error after following those instructions.
from meteor-autoform-bs-datetimepicker.
$ meteor add comerc:bs-datetimepicker
$ cd packages
$ git clone https://github.com/comerc/meteor-autoform-bs-datetimepicker.git
$ cd meteor-autoform-bs-datetimepicker
$ git checkout v4beta
add line to ./meteor/packages
aldeed:autoform-bs-datetimepicker
It works.
from meteor-autoform-bs-datetimepicker.
it works now 👍
Thanks!
from meteor-autoform-bs-datetimepicker.
Dear Lucatros,
I can't get either language: 'es' nor locale: 'es' to work with your MeteorPad example. I added also the package rzymek:moment-locale-ex and still nothing. Have you solved it?
By the way... which one is V3 or V4?
from meteor-autoform-bs-datetimepicker.
Did you add locale: es
to the dateTimePickerOptions
?
Something like this:
fechaNacimiento: {
type: Date,
label: "Fecha de nacimiento",
autoform: {
afFieldInput: {
type: "bootstrap-datetimepicker",
outMode: 'utcDate',
dateTimePickerOptions: {
format: 'L',
locale: 'es'
}
}
}
},
Note that if you are using version 3 you should use language
instead of locale
from meteor-autoform-bs-datetimepicker.
Yes. That is exactly what I did. But I also tried language and both did not work for me. I am sure I am doing something wrong with the versions of the packages I've installed, but could not figure out what.
I decided to move to another date picker implementation (https://github.com/eternicode/bootstrap-datepicker) and use their i18N solution instead.
$.fn.datepicker.dates['es'] = {
days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sabado"],
daysShort: ["Dom","Lun", "Mar", "Mie", "Jue", "Vie", "Sab"],
daysMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"],
months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"],
today: "Hoy",
clear: "Borrar"
};
from meteor-autoform-bs-datetimepicker.
On my end, I'm using the v4beta from comerc and it's working with locales.
Check comments above on how to use the version from comerc and you should have no problems with locales.
from meteor-autoform-bs-datetimepicker.
when I am using "dateTimePickerOptions" in my schema , my template using that particular field is not rendering .Does any one have idea why it is happening??my schema looks similar like this
d:
{
type: String,
label: "Certification Date",
optional:true,
autoform: {
afFieldInput: {
type: "bootstrap-datepicker",
placeholder:"Certification Date Received",
class:"certification-date-received",
dateTimePickerOptions: {
format: 'DD MMMM YYYY '
}
}
}
}
from meteor-autoform-bs-datetimepicker.
@Devarashetty Try to change type: String to type: Date
@lucatros: Thank you, my locales are working finally!
from meteor-autoform-bs-datetimepicker.
Related Issues (20)
- Using reactive variable to set date on timepicker, but date doesn't show. HOT 1
- Type:Number is not working HOT 2
- interval settings on timepicker don't work with v. 3.1.3_3 of tsega:bootstrap3-datetimepicker HOT 1
- When bootstrap navbar present, date picker appears above and off the screen. HOT 1
- Incompatibility with tsega:bootstrap3-datetimepicker@4 and above HOT 7
- Value will be reset after validation problem HOT 2
- Show debug on browser console "dtp.setDate is not a function"? HOT 4
- upgrade bootstrap to later version in the package 4.17.37 HOT 5
- Reset issue while adding new datetime field in a form. HOT 1
- customizing HOT 2
- gooseman implementation throws an Error: datetimepicker component should be placed within a relative positioned container HOT 1
- datepicker set date dynamic value HOT 1
- getDate() in undefined HOT 3
- currentDate not sets the correct date, but alway 12:00 am HOT 1
- UTC Time HOT 1
- timezoneId doesn't work HOT 1
- Wrong moment-timezone package HOT 1
- Could update to last of datetimepicker? HOT 1
- LT format not supported HOT 3
- Update moment packages to use NPM HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-autoform-bs-datetimepicker.