GithubHelp home page GithubHelp logo

Comments (35)

lucascurti avatar lucascurti commented on May 30, 2024 2

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.

aldeed avatar aldeed commented on May 30, 2024

I would think that would work.

from meteor-autoform-bs-datetimepicker.

boustanihani avatar boustanihani commented on May 30, 2024

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.

lucascurti avatar lucascurti commented on May 30, 2024

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.

boustanihani avatar boustanihani commented on May 30, 2024

Could you share some code ?

from meteor-autoform-bs-datetimepicker.

lucascurti avatar lucascurti commented on May 30, 2024

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.

lucascurti avatar lucascurti commented on May 30, 2024

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.

boustanihani avatar boustanihani commented on May 30, 2024

You are using the wrong options.

Use minuteStepping instead of stepping and language instead of locale

from meteor-autoform-bs-datetimepicker.

boustanihani avatar boustanihani commented on May 30, 2024

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.

lucascurti avatar lucascurti commented on May 30, 2024

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.

boustanihani avatar boustanihani commented on May 30, 2024

Were you able to find the docs for version 3?

from meteor-autoform-bs-datetimepicker.

boustanihani avatar boustanihani commented on May 30, 2024

Which options are not working? I just checked your Meteorpad and minuteStepping is working as it should...

from meteor-autoform-bs-datetimepicker.

lucascurti avatar lucascurti commented on May 30, 2024

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.

lucascurti avatar lucascurti commented on May 30, 2024

On my code, any of the options are working. Even the ones that are working on the MeteorPad sample.

from meteor-autoform-bs-datetimepicker.

boustanihani avatar boustanihani commented on May 30, 2024

Is calendarWeeks a v3-option or a v4-option ?

from meteor-autoform-bs-datetimepicker.

lucascurti avatar lucascurti commented on May 30, 2024

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.

boustanihani avatar boustanihani commented on May 30, 2024

You mean it is working on Meteorpad but not in your project ?

from meteor-autoform-bs-datetimepicker.

lucascurti avatar lucascurti commented on May 30, 2024

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.

boustanihani avatar boustanihani commented on May 30, 2024

I would say compare your package list versions...

from meteor-autoform-bs-datetimepicker.

lucascurti avatar lucascurti commented on May 30, 2024

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.

boustanihani avatar boustanihani commented on May 30, 2024

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.

lucascurti avatar lucascurti commented on May 30, 2024

Will do! Thanks!

from meteor-autoform-bs-datetimepicker.

boustanihani avatar boustanihani commented on May 30, 2024

Welcome 👍

from meteor-autoform-bs-datetimepicker.

comerc avatar comerc commented on May 30, 2024

You may use V4 now: #7

I will make merge branches in the near future.

from meteor-autoform-bs-datetimepicker.

lucascurti avatar lucascurti commented on May 30, 2024

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.

comerc avatar comerc commented on May 30, 2024

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.

lucascurti avatar lucascurti commented on May 30, 2024

Yeap. That's what I did. I'm getting the error after following those instructions.

from meteor-autoform-bs-datetimepicker.

comerc avatar comerc commented on May 30, 2024
$ 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.

lucascurti avatar lucascurti commented on May 30, 2024

it works now 👍

Thanks!

from meteor-autoform-bs-datetimepicker.

juliomac avatar juliomac commented on May 30, 2024

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.

lucascurti avatar lucascurti commented on May 30, 2024

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.

juliomac avatar juliomac commented on May 30, 2024

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.

lucascurti avatar lucascurti commented on May 30, 2024

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.

sairamdevarashetty avatar sairamdevarashetty commented on May 30, 2024

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.

Ouro17 avatar Ouro17 commented on May 30, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.