Giter VIP home page Giter VIP logo

ember-cli-bootstrap-datetimepicker's People

Contributors

akilanbandara avatar asux avatar btecu avatar csantero avatar daedalusx avatar davorpadovan avatar dependabot[bot] avatar ember-tomster avatar frunjik avatar geoffroyw avatar happydude avatar iliasderos avatar jevanlingen avatar jlami avatar jlblcc avatar khornberg avatar m-adler avatar nruiz3 avatar pcambra avatar scott-fanetti-genesys avatar trojanware avatar zavan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ember-cli-bootstrap-datetimepicker's Issues

Make datetimerpicker work with Fastboot

Currently we want to use fastboot for our ember app. But the app won't load because of this "bootstrap-datetimepicker requires jQuery to be loaded first" message.

Is it possible to make this component work with fastbook?

This doesn't seems to work. :-\

in my controller:

  startTime: new Date(),

in my template (emblem):

    = bs-datetimepicker date=startTime

all that shows up in a text field with the date in it. clicking it doesn't activate the date picker. :-\

Am I missing something?

"ember": "1.13.7",
"ember-cli": "1.13.8",
"ember-cli-bootstrap-datetimepicker": "0.0.4",

Fails with Ember 3 and Bootstrap 4

I tried to use it with Ember 3 and Bootstrap 4 and unfortunately failed to display it correctly:

# templates/working-hours.hbs

<div class="form-group col-sm-4">
    {{bs-datetimepicker date='13-04-2018' showClear=true format='HH:mm'}}
</div>

Do I use the correct syntax ? Nothing but a textfield is displayed:

screen shot 2018-04-13 at 14 45 18

Another point is that, the add-on uses glyphicon glyphicon-calendar icon which is not available with Bootstrap 4 (they are extracted icons and advise to use some external libraries.
My config:

ember-cli: 3.0.0
node: 8.9.1
os: darwin x64

TypeError when changing disabledDates

I'm working on updating a project from ember 3.4 to 3.8. I'm running into a TypeError when changing the dates on the array passed into disabledDates.

metal.js:289 Uncaught TypeError: Cannot read property 'apply' of undefined
    at sendEvent (metal.js:289)
    at ObserverSet.flush (metal.js:417)
    at endPropertyChanges (metal.js:855)
    at changeProperties (metal.js:881)
    at setProperties (metal.js:3710)
    at Class.setProperties (observable.js:193)
    at CurlyComponentManager.update (glimmer.js:4435)
    at UpdateComponentOpcode.evaluate (runtime.js:1888)
    at UpdatingVM.execute (runtime.js:4280)
    at RenderResult.rerender (runtime.js:4607)

When pausing on exceptions I see an action of updateDisabledDates on InteractiveRenderer.
I saw in addon/components/bs-datetimepicker.js there is an add and remove observer for updateDisabledDates but I cannot find where this is defined.

I was able to duplicate the issue with a test in bs-datetimepicker-test.js #69

Just changing the array is all that is needed to replicate the error

this.set('disabledDates',['2016-01-02','2016-01-03']);
await render(hbs`{{bs-datetimepicker date='2016-01-01' disabledDates=disabledDates openOnFocus=true}}`);
this.set('disabledDates',['2016-01-02','2016-01-03','2016-01-04']);

Icon configuration

Using v0.7.0

I'm attempting to set the icons global, but it doesn't seem to be working. I'm sure I'm missing something stupid, but haven't found many examples to go by...

module.exports = function (environment) {
    let ENV = {
        modulePrefix: 'web-directory',
        environment,
        rootURL: '/',
        locationType: 'hash',
        EmberENV: {
            MODEL_FACTORY_INJECTIONS: true,
            FEATURES: {
            }
        },

        APP: {
            version: pkg.version,
            semver: pkg.version + '-edge',
            urlprefix: '',
            buildNumber: process.env.BUILD_NUMBER || 'BUILDNUM',
            libs: buildLibraryVersions()
        },

        'ember-cli-bootstrap-datetimepicker': {
            icons: {
                date: 'fa fa-calendar-alt',
                next: 'fa fa-chevron-right',
                previous: 'fa fa-chevron-left'
            }
        },

I can see the icons object when I do require('web-directory/config/environment') from the Chrome Inspector console...but when I step into the breakpoint at date: this.getWithDefault('config.icons.date', defaults.icons.date),, there's nothing at root.config.

I'm not sure if it makes a difference, but the environment config file is on my parent app, while the datetimepicker component is in an addon being used by one of the engines inside the parent app. It's clear that the datetimepicker code is being loaded, but for some reason it seems that its not loading, or not finding, the env variables?

bootstrap-datetimepicker requires Moment.js to be loaded first

Installed via ember-cli

ember install ember-cli-bootstrap-datetimepicker

and I'm seeing this error when trying to use this component:

vendor.js:135832Uncaught bootstrap-datetimepicker requires Moment.js to be loaded first

I do have moment included in my package.json. Do I need to import it as a global? Is there a way to have it use the import moment from "npm:moment"; syntax? I want to avoid including moment through bower and NPM.

Thanks!

Changes in value of locale attr do not reflect

The wrapper does not pass on changes of locale attribute to the jquery plugin.

Solution:
Observe the value of attr:locale and update the plugin's locale using the locale method on the plugin.

I'll raise a pull request for this shortly.

dynamically updating daysOfWeekDisabled not updating datetimepicker

In the code below, updating daysOfWeekDisabled via the daysOff computed does not seem to be felt at the bs-datetimepicker, not sure if it's possible to update the datetimepicker widget with the new values this way but maybe possibly it would be required to destroy and recreate the whole component then?

{{bs-datetimepicker format='LD' date=randomOffDay 
  daysOfWeekDisabled=(map-by "value" daysOff)}}

Thanks!

minDate is assigned to Default Date

If I provide the minDate value, it assign this value to default date.
While creating a new record, it creates a bug.
I wonder if it is possible to show blank as default value in calendar.

Trigger action when date changes or focus is lost

I am using ember-cli-bootstrap-datetimepicker inside a component.

When I select a date or time in the popup, my internal value is changed as expected. When I leave the field, I want to send the date time value to the server.

I have this working for simple input fields.

{{!-- string-field.hbs --}}
<div class="form-group">
  <label>{{observation.name}}</label>
  {{ input class="form-control" type="text"
     value=observation.stringValue focus-out=(action 'lostFocus') }}
</div>

However I cannot make this work for a bs-datetimepicker field

{{!-- datetime-field.hbs --}}
<div class="form-group">
  <label>{{observation.name}}</label>
  {{ bs-datetimepicker date=observation.datetimeValue focus-out=(action 'lostFocus')}}
</div>

I also tried to add a change action in my component but it is not fired when the date changes.

Any suggestions?

BTECU dependency version issue?

We've been having an issue with our build recently, getting and error

14:57:11 The Broccoli Plugin: [BroccoliMergeTrees: TreeMerger (vendor & appJS)] failed with:
14:57:11 Error: ENOENT: no such file or directory, open '/var/build/workspace/ber-engine-contacts_CustomFields/tmp/source_map_concat-input_base_path-fT3qcw5h.tmp/node_modules/btecu-eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js'

When I looked into it more, I noticed the version dependencies for btecu-eonasdan-bootstrap-datetimepicker were at 4.17.48, which matches what NPM shows here, yet their repo shows the latest release as .47 (here).

I'm guessing I should make a similar issue ticket on that repo, but you may want to pin this back to .47?

Pop-up not displaying on Ember 2.9.1 with Bootstrap 3.3.7

My issue is that the pop-up calendar does not appear when I click in the input box or when I click the calendar icon. And, I'm a little baffled as to why not. Any ideas would be appreciated. Perhaps it's an Ember 2.9.1/Bootstrap 3.3.7 version issue. I am using the workaround for JQuery 3.0 to add size.

I would like to leave useful information for troubleshooting, but there's not much. There are no error messages in the console. The initial date value I provided appears in the input box. I've checked and datetimepicker appears to initialize fine and I can see it's properties. The calendar icon appears. If I send an undefined date (as opposed to a null date), it I can see an error message from the datetimepicker.js.

So, everything appears to be "working". But, the calendar pop-up does not display.

I've tried to initialize another field manually with:
$('#myfield').datetimepicker();
and then toggle on the display with:
$('#myfield').data('DateTimePicker').toggle();
and it still does not display the calendar. The toggle function is available but appears to do nothing.

I'm stumped. Any suggestions would be greatly appreciated.

Changes in value of locale attr do not reflect

The wrapper does not pass on changes of locale attribute to the jquery plugin.

Solution:
Observe the value of attr:locale and update the plugin's locale using the locale method on the plugin.

I'll raise a pull request for this shortly.

Passing an undefined value results in datepicker error

Hi and thanks for your addon ! I have a question regarding this line of code :
date: this.getWithDefault('date', defaults.defaultDate))

The value of defaults.defaultDate in bootstrap datetimepicker is false. When passing an undefined value do the component, I'm having the following error : date() parameter must be one of [null, string, moment or Date] which is logical as the date's value is false.

IMO passing a undefined value to the component should display an empty datetimepicker.

I bypassed this issue by manually setting null to the property.

Thanks !

&zwnj; displaying as text

Using the latest version the default &zwnj; is displaying as text rather than being interrepted.

image

Setting iconText to a blank string fixes it.
image

Is that the intent?

disabled=true support?

Forgive me for such a noob question, but is it possible to disable the component as in disabled=true? I'm trying to create a UI where the element doesn't visually change, but editing the value is not possible (based on permissions). I've tried a number of variants and can't find anything in the repo itself...

thanks

calendarWeeks

First of all: Thanks for this addon!

Could you add the option calendarWeeks to the set of options we can send to bootstrap-datetimepicker? Or can I make a PR for this?

Date Picker not working with Ember 3.13

Since I upgraded the project to ember-cli 3.13, the date picker is not showing anymore (See Screenshot). Time Picker is still working. No error messages are showing in console. I tried using version 0.9.1 (which was working before the upgrade) and 0.9.2. Both don't work.

image
image

The component I implemented:
<BsDatetimepicker @id="control_datetimepicker_start" @Date={{startDate}} @Locale={{locale}} @Class="xc_deliveries-dtpicker" @maxDate={{maxStartDate}} @change={{action "changeFrom"}} />

missing jquery error with ember-source 3.4

After upgrading my app to ember-source 3.4, I'm now getting a runtime error from bootstrap-datetimepicker.js: bootstrap-datetimepicker requires jQuery to be loaded first. I've already followed the instructions at https://github.com/emberjs/ember-jquery, and $ is defined globally, but a jQuery variable is not available for this script. bootstrap-datetimepicker.js has code to load jQuery (and moment) as an AMD module, so is there a way we can configure this addon to provide jQuery that way instead of via the global?

Setting locale does not seem to work

Setting the locale does not change e.g. month names in my case.
I am using ember-cli-moment-shim and did set moment.includeLocales to true.
If I access the jQuery DateTimePicker object and call locale() the language does change but the names in the date picker stay in English.

Any hints?

Versions used:

ember-cli: 3.16.0
ember-cli-moment-shim: 3.7.1
ember-cli-bootstrap-datetimepicker: 0.9.2

Reseting the date causes JS error

When user clears entered date, JS error happens.
"Uncaught TypeError: date() parameter must be one of [null, string, moment or Date]"

After some investigations I've found, that it's happened here:
https://github.com/Eonasdan/bootstrap-datetimepicker/blob/master/src/js/bootstrap-datetimepicker.js#L1499-L1501

When date is changed, you handles that event and set the date:
https://github.com/btecu/ember-cli-bootstrap-datetimepicker/blob/master/addon/components/bs-datetimepicker.js#L26

But newDate = false there, because

https://github.com/Eonasdan/bootstrap-datetimepicker/blob/master/src/js/bootstrap-datetimepicker.js#L853-L857

I suggest the easiest fix:

this.set('date', newDate || null);

Support for Node v10.*

Hi,
i'm getting the following error when doing a ember install ember-cli-bootstrap-datetimepicker

error [email protected]: The engine "node" is incompatible with this module. Expected version "6.* || 8.* || 9.*".

ember-cli: 3.2.0
node: 10.4.1

DEPRECATION

DEPRECATION: A property of <redact@view:-outlet::ember658> was modified inside the didInsertElement hook. You should never change properties on components, services or models during didInsertElement because it causes significant performance degradation. [deprecation id: ember-views.dispatching-modify-property]

Cannot find module 'eonasdan-bootstrap-datetimepicker-npm'

I noticed that eonasdan-bootstrap-datetimepicker-npm is listed as part of devDependencies in package.json. As a result, it does not get installed if you install this add on with the typical npm install && bower install command.

Should eonasdan-bootstrap-datetimepicker-npm be moved to dependencies rather than devDependencies? Otherwise I have to add an exception for this this addon to use ember install as part of our build process.

Bootstrap 4 Support

This plugin is really awesome where I could use in lot of places in my current Project. Thanks for building that. Is there any way that this could support bootstrap 4 alpha ?

0.4.0 installation crash

Attempting to install latest (0.4.0) ember-cli-bootstrap-datetimepicker results in the following error :
Unexpected token {

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Class.CoreObject.extend.config (/home/ilias/Documents/Dev/triage-frontend/node_modules/ember-cli/lib/models/addon.js:898:29)
    at /home/ilias/Documents/Dev/triage-frontend/node_modules/ember-cli/lib/models/project.js:224:29
    at Array.reduce (native)

Workaround: Use the following install command instead :

ember install [email protected]

Versions information :
ember-cli: 2.10.0
Node 4.6.2

Use of const in strict mode

Hi, I'm trying to install this addon but I'm getting the next issue.

vagrant@packer-debian-7:~/$` ember install ember-cli-bootstrap-datetimepicker
Installed packages for tooling via npm.
./node_modules/ember-cli-bootstrap-datetimepicker/index.js:4
const Funnel = require('broccoli-funnel');
^^^^^
Use of const in strict mode.
./node_modules/ember-cli-bootstrap-datetimepicker/index.js:4
const Funnel = require('broccoli-funnel');
^^^^^
SyntaxError: Use of const in strict mode.
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Function.Addon.lookup (./node_modules/ember-cli/lib/models/addon.js:879:19)
    at ./node_modules/ember-cli/lib/models/addons-factory.js:47:36
    at visit (./node_modules/ember-cli/lib/utilities/DAG.js:23:3)

Thanks,

Possibility to click on weeks

Hi there,

is there a possibility to make the weeknumbers clickable?
And have them to be disabled in certain situations?

Upgrade to 0.6.0 issue

I don't know how ember really builds things but have tried to update to 0.6.0 and hit an issue on ember serve:

Warning: ignoring input sourcemap for vendor/ember/ember.debug.js because ENOENT: no such file or directory, open '/Users/ewan/git/ember-app/tmp/source_map_concat-input_base_path-b84lOJ04.tmp/vendor/ember/ember.debug.map'
The Broccoli Plugin: [BroccoliMergeTrees: TreeMerger (vendor & appJS)] failed with:
Error: ENOENT: no such file or directory, open '/Users/ewan/git/ember-app/tmp/source_map_concat-input_base_path-b84lOJ04.tmp/node_modules/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js'
    at Object.fs.openSync (fs.js:653:18)
    at Object.fs.readFileSync (fs.js:554:33)
    at SourceMap.addFile (/Users/ewan/git/ember-app/node_modules/fast-sourcemap-concat/lib/source-map.js:75:31)
    at /Users/ewan/git/ember-app/node_modules/broccoli-concat/concat.js:200:16
    at Array.forEach (<anonymous>)
    at Concat.<anonymous> (/Users/ewan/git/ember-app/node_modules/broccoli-concat/concat.js:198:24)
    at /Users/ewan/git/ember-app/node_modules/fast-sourcemap-concat/lib/source-map.js:399:12
    at initializePromise (/Users/ewan/git/ember-app/node_modules/rsvp/dist/rsvp.js:567:5)
    at new Promise (/Users/ewan/git/ember-app/node_modules/rsvp/dist/rsvp.js:1039:33)
    at SourceMap.end (/Users/ewan/git/ember-app/node_modules/fast-sourcemap-concat/lib/source-map.js:386:10)

The broccoli plugin was instantiated at: 
    at BroccoliMergeTrees.Plugin (/Users/ewan/git/ember-app/node_modules/broccoli-plugin/index.js:7:31)
    at new BroccoliMergeTrees (/Users/ewan/git/ember-app/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:16:10)
    at Function.BroccoliMergeTrees [as _upstreamMergeTrees] (/Users/ewan/git/ember-app/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:10:53)
    at mergeTrees (/Users/ewan/git/ember-app/node_modules/ember-cli/lib/broccoli/merge-trees.js:85:33)
    at EmberApp._mergeTrees (/Users/ewan/git/ember-app/node_modules/ember-cli/lib/broccoli/ember-app.js:1815:12)
    at EmberApp.javascript (/Users/ewan/git/ember-app/node_modules/ember-cli/lib/broccoli/ember-app.js:1297:17)
    at EmberApp.toArray (/Users/ewan/git/ember-app/node_modules/ember-cli/lib/broccoli/ember-app.js:1672:12)
    at EmberApp.toTree (/Users/ewan/git/ember-app/node_modules/ember-cli/lib/broccoli/ember-app.js:1694:38)
    at module.exports (/Users/ewan/git/ember-app/ember-cli-build.js:34:14)
    at Builder.setupBroccoliBuilder (/Users/ewan/git/ember-app/node_modules/ember-cli/lib/models/builder.js:56:19)

Working deps:

    "auto-changelog": "^0.3.1",
    "broccoli-asset-rev": "^2.4.5",
    "ember-ajax": "^3.0.0",
    "ember-c3": "^0.3.1",
    "ember-c3-shim": "^0.0.7",
    "ember-cli": "~2.14.0",
    "ember-cli-app-version": "^3.0.0",
    "ember-cli-babel": "^6.3.0",
    "ember-cli-bootstrap-datetimepicker": "^0.5.0",
    "ember-cli-bootstrap-sassy": "^0.5.6",
    "ember-cli-bootstrap3-popover": "^1.0.3",
    "ember-cli-clipboard": "^0.8.0",
    "ember-cli-dependency-checker": "^1.3.0",
    "ember-cli-eslint": "^3.0.0",
    "ember-cli-flash": "^1.4.3",
    "ember-cli-geo": "^4.0.0",
    "ember-cli-htmlbars": "^2.0.1",
    "ember-cli-htmlbars-inline-precompile": "^0.4.3",
    "ember-cli-inject-live-reload": "^1.4.1",
    "ember-cli-moment-shim": "^3.3.0",
    "ember-cli-qunit": "^4.0.0",
    "ember-cli-sass": "^6.1.3",
    "ember-cli-shims": "^1.1.0",
    "ember-cli-sri": "^2.1.0",
    "ember-cli-string-helpers": "^1.4.0",
    "ember-concurrency": "^0.8.10",
    "ember-d3": "^0.2.0",
    "ember-data": "~2.14.10",
    "ember-data-model-fragments": "^2.14.0",
    "ember-export-application-global": "^2.0.0",
    "ember-font-awesome": "^3.0.5",
    "ember-i18n": "^5.0.2",
    "ember-leaflet": "^3.0.12",
    "ember-load-initializers": "^1.0.0",
    "ember-power-select": "^1.9.6",
    "ember-radio-button": "^1.1.1",
    "ember-resolver": "^4.0.0",
    "ember-route-action-helper": "^2.0.5",
    "ember-scroll-to": "^0.6.4",
    "ember-select": "^0.3.0",
    "ember-source": "~2.14.0",
    "ember-string-helpers": "^1.0.1",
    "ember-truth-helpers": "^1.3.0",
    "ember-welcome-page": "^3.0.0",
    "eonasdan-bootstrap-datetimepicker-npm": "4.17.42",
    "eslint-plugin-ember": "^4.1.2",
    "git-changelog": "^1.1.2",
    "leaflet": "^1.0.0",
    "loader.js": "^4.2.3"
  },

package.json diff after upgrade that does not work (see error above):

index a00a7bf..7fc13c1 100644
--- a/package.json
+++ b/package.json
@@ -27,7 +27,7 @@
     "ember-cli": "~2.14.0",
     "ember-cli-app-version": "^3.0.0",
     "ember-cli-babel": "^6.3.0",
-    "ember-cli-bootstrap-datetimepicker": "^0.5.0",
+    "ember-cli-bootstrap-datetimepicker": "^0.6.0",
     "ember-cli-bootstrap-sassy": "^0.5.6",
     "ember-cli-bootstrap3-popover": "^1.0.3",
     "ember-cli-clipboard": "^0.8.0",
@@ -38,7 +38,7 @@
     "ember-cli-htmlbars": "^2.0.1",
     "ember-cli-htmlbars-inline-precompile": "^0.4.3",
     "ember-cli-inject-live-reload": "^1.4.1",
-    "ember-cli-moment-shim": "^3.3.0",
+    "ember-cli-moment-shim": "3.5.0",
     "ember-cli-qunit": "^4.0.0",
     "ember-cli-sass": "^6.1.3",
     "ember-cli-shims": "^1.1.0",
@@ -67,7 +67,9 @@
     "eslint-plugin-ember": "^4.1.2",
     "git-changelog": "^1.1.2",
     "leaflet": "^1.0.0",
-    "loader.js": "^4.2.3"
+    "loader.js": "^4.2.3",
+    "moment": "^2.19.1",
+    "moment-timezone": "^0.5.13"
   },
   "engines": {
     "node": "^4.5 || 6.* || >= 7.*"

Uncaught TypeError: date() parameter must be one of [null, string, moment or Date]

I have a model with undefined for the value of a date property (it's a create page and my values on all properties to begin with are undefined). When I use this in ember-cli-bootstrap-datetimepicker I get the following error:
Uncaught TypeError: date() parameter must be one of [null, string, moment or Date]
Looking at line 50 of the bs-datetimepicker.js file I see that:
date: this.getWithDefault('date', defaults.defaultDate),
Is the source of this error. When I console.log(defaults.defaultDate) I see that the value is false. If in line 50 I replace defaults.defaultDate with null, it works fine, but I suspect this does not handle things as intended in all cases.

Getting Error "input.size is not a function" after upgrading to Ember 2.8

Started seeing this error after upgrading to Ember 2.8. Doesn't seem like it would be ember 2.8 related so it might be a coincidence and something else was modified during the upgrade process:

app.js:15 Uncaught TypeError: input.size is not a function
dateTimePicker @ bootstrap-datetimepicker.js:2305
(anonymous function) @ bootstrap-datetimepicker.js:2364
each @ jquery.js:368
each @ jquery.js:157
$.fn.datetimepicker @ bootstrap-datetimepicker.js:2359
didInsertElement @ bs-datetimepicker.js:42
superWrapper @ ember.debug.js:24798

This is when using the latest 0.3.1 version of ember-cli-bootstrap-datetimepicker. The only other change I've made to the project is that I started using ember-moment as well.

Support for Ember 4x

Upgrading ember to 3.28.11 gives the warning below, and disabling jquery optional-features in favour of @ember/jquery breaks the picker.

WARNING: Setting the jquery-integration optional feature flag to true, or not providing a setting at all, has been deprecated. You must add the @ember/optional-features addon and set this feature to false. This warning will become an error in Ember 4.0.0.

I'm suppose to upgrade to ^4.4 and need a work around to get the date-picker to work with jquery-integration set to false. Thanks

Releases 0.4.0 and 0.4.1 cannot be installed

trying to ember install [email protected] or 0.4.0
gives the following error

Unexpected token {
SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:405:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at CoreObject.extend.config (/home/foo/Projects/bar/pt-abp/node_modules/ember-cli/lib/models/addon.js:810:29)
    at /home/foo/Projects/bar/pt-abp/node_modules/ember-cli/lib/models/project.js:223:27
    at Array.reduce (native)

Global Icons

I like the idea of global icons.
I am not able to change date and time icons with the global setting. I can set them with iconClasses and iconText. Perhaps date and time are not the icons I think they are.

As a note, the global icons do not allow for the the typical material icon since there is no way to set the inner html, only the class name. However with the after pseudo selector, one can set the text.

I've been able to get material icons work with this by setting the config to

{
  next: 'material-icons chevron_right,
}

and then in a stylesheet

.material-icons.chevron_right::after { content: 'chevron_right' }

showIcon=false causes an exception

If you set showIcon to false then you get the following exception when opening the picker:

bootstrap-datetimepicker.js:426 Uncaught TypeError: Cannot read property 'top' of undefined
    at place (bootstrap-datetimepicker.js:426)
    at Object.show (bootstrap-datetimepicker.js:1254)
    at Class.focus (bs-datetimepicker.js:113)
    at Backburner._run (backburner.js:758)
    at Backburner._join (backburner.js:736)
    at Backburner.join (backburner.js:477)
    at Function.run.join (ember-metal.js:4366)
    at action.js:364
    at exports.flaggedInstrument (ember-metal.js:3920)
    at HTMLInputElement.<anonymous> (action.js:363)

I think this is because the input-group class is always added, but it's only needed if the icon is rendered.

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.