<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use updated version of moment.js in my dashboard? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-updated-version-of-moment-js-in-my-dashboard/m-p/505447#M2094</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks a lot for taking out your time to answer this. I just have a couple of questions.&lt;/P&gt;&lt;P&gt;1. Will my path in this case be?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;/static/app/mysplunkapp/moment.js&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now I'm using the library from a CDN server and giving the path below. Is that also okay?&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-withlocales.min.js&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;2. Do I need the line below as I have already loaded the library?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var moment = require('moment');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jun 2020 09:05:32 GMT</pubDate>
    <dc:creator>umairahmad3985</dc:creator>
    <dc:date>2020-06-22T09:05:32Z</dc:date>
    <item>
      <title>How to use updated version of moment.js in my dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-updated-version-of-moment-js-in-my-dashboard/m-p/505050#M2045</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am using version 8.0.0 of Splunk Enterprise and I am running into a problem due to version conflict of a JavaScript library.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In one of my dashboards, I am using JavaScript for some customization where I require moment.js for a Date-picker. The Date-picker library only works with version 2.24.0 however, Splunk also uses moment.js for its own working but an older version 2.8.3. When I try to include moment.js (version 2.24.0) there is a conflict with Splunk's version and hence I cannot use that library in my dashboard.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest me any way to resolve this conflict between Splunk's version of moment.js and my own version as the Date-picker library is only compatible with version 2.24.0 of moment.js&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shall be hugely grateful for any positive suggestions.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Umair&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 17:44:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-updated-version-of-moment-js-in-my-dashboard/m-p/505050#M2045</guid>
      <dc:creator>umairahmad3985</dc:creator>
      <dc:date>2020-06-18T17:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to use updated version of moment.js in my dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-updated-version-of-moment-js-in-my-dashboard/m-p/505425#M2092</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/218061"&gt;@umairahmad3985&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here we can go with same solution but with some variation.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Dashboards-Visualizations/Moment-js-won-t-work-in-XML/td-p/434524" target="_blank"&gt;https://community.splunk.com/t5/Dashboards-Visualizations/Moment-js-won-t-work-in-XML/td-p/434524&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Download latest version of moment.js and put into your app.&lt;/LI&gt;&lt;LI&gt;change the path of moment in &lt;SPAN&gt;require([]) &lt;/SPAN&gt;array.&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;require([
    'underscore',
    'jquery',
    'splunkjs/mvc',
    'splunkjs/mvc/simplexml/ready!',
    '&amp;lt;&amp;lt;PATH OF LATEST MOMENT JS&amp;gt;&amp;gt;'
    ], function(_, $, mvc) {

        var moment = require('moment');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try and let me know if you face any difficulties:)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;Kamlesh Vaghela&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 06:45:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-updated-version-of-moment-js-in-my-dashboard/m-p/505425#M2092</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-06-22T06:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use updated version of moment.js in my dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-updated-version-of-moment-js-in-my-dashboard/m-p/505447#M2094</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks a lot for taking out your time to answer this. I just have a couple of questions.&lt;/P&gt;&lt;P&gt;1. Will my path in this case be?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;/static/app/mysplunkapp/moment.js&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now I'm using the library from a CDN server and giving the path below. Is that also okay?&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-withlocales.min.js&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;2. Do I need the line below as I have already loaded the library?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var moment = require('moment');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 09:05:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-updated-version-of-moment-js-in-my-dashboard/m-p/505447#M2094</guid>
      <dc:creator>umairahmad3985</dc:creator>
      <dc:date>2020-06-22T09:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to use updated version of moment.js in my dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-updated-version-of-moment-js-in-my-dashboard/m-p/505472#M2098</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/218061"&gt;@umairahmad3985&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not able to access below URL&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-withlocales.min.js&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I tried this URL and working fine.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.0/moment.min.js&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this JS code in your JS?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require.config({
    paths: {
        "moment": "https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.0/moment.min"
    }
});

var deps = [
	"moment",
	"splunkjs/ready!"
];

require(deps, function(moment) {
	console.log("Test moment",moment);
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;Kamlesh Vaghela&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 12:10:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-use-updated-version-of-moment-js-in-my-dashboard/m-p/505472#M2098</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-06-22T12:10:08Z</dc:date>
    </item>
  </channel>
</rss>

