<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Date Picker close when clicked outside of the datepicker]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7921&amp;type=atom" />
	<updated>2019-07-16T03:53:56Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7921</id>
		<entry>
			<title type="html"><![CDATA[Re: Date Picker close when clicked outside of the datepicker]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35453#p35453" />
			<content type="html"><![CDATA[<p>Bootstrap implementation may have <a href="https://bootstrap-datepicker.readthedocs.io/en/latest/">other working scripts for datepicker</a>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-07-16T03:53:56Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35453#p35453</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Picker close when clicked outside of the datepicker]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35442#p35442" />
			<content type="html"><![CDATA[<p>Hello kvvaradha,<br />I&#039;m working on some bootstrap theme(s), where I&#039;m faced with below issue;</p><p>-&gt; the theme works fine, but the datepicker creates issues ;<br />&nbsp; - clicked for any forms having the date picker ; the top nav bar comes down ,<br />&nbsp; - when want to select date ; the date picker is out from its place - on upper of top navbar, <br />&nbsp; -&nbsp; AND&nbsp; all the issues are solved and the theme is re-positioned well&nbsp; , once the date is selected from the date picker...</p><p>Any solution ?...</p><p>Thanks in advance...<br />A.P</p>]]></content>
			<author>
				<name><![CDATA[Ajmal]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41160</uri>
			</author>
			<updated>2019-07-15T06:20:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35442#p35442</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Picker close when clicked outside of the datepicker]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=35441#p35441" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>kvvaradha wrote:</cite><blockquote><p>We normally seen other date pickers,which actually close when we click outside of the date picker. </p><p>So i thought to implement the same here in our FA with js. So just tried this and it works fine. Hope it will be good for users, if you commit it to core.</p><div class="codebox"><pre><code>window.addEventListener(&#039;click&#039;, function(e){   
  if (document.getElementById(&#039;CC&#039;).contains(e.target)){} else{
   if (cC.visible()) {
    cC.hide();
      }
  }
});</code></pre></div><p>Append this code to date_picker.js file,which actually created from ui_view.inc</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Ajmal]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=41160</uri>
			</author>
			<updated>2019-07-15T06:16:22Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=35441#p35441</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Picker close when clicked outside of the datepicker]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33858#p33858" />
			<content type="html"><![CDATA[<p>That&#039;s nice to see.&nbsp; </p><p>@apmuthu,actually if you open another date picker, its outside of current one. So the already opened date picker will be closed before opens the new one. </p><p>I guess that wont be much difficult for the users to work on.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2019-01-05T10:57:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33858#p33858</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Picker close when clicked outside of the datepicker]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33856#p33856" />
			<content type="html"><![CDATA[<p>Hello Guys,</p><p>This has been committed to stable repo. Thanks @kvvaradha and @apmuthu.</p><p>The fixed file can be downloaded <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/includes/ui/ui_view.inc">here</a>.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2019-01-05T09:48:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33856#p33856</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Picker close when clicked outside of the datepicker]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33850#p33850" />
			<content type="html"><![CDATA[<p>There is a &quot;Back&quot; link on the calendar display that does it but your method may be useful too - hope it will not clash when multiple date fields are on the same form.</p><p>@joe: Attached is the code change in <strong>includes/ui/ui_view.inc</strong> needed to have the <em>date_picker.js</em> recreated on js cache purge.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-01-05T06:34:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33850#p33850</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Date Picker close when clicked outside of the datepicker]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=33842#p33842" />
			<content type="html"><![CDATA[<p>We normally seen other date pickers,which actually close when we click outside of the date picker. </p><p>So i thought to implement the same here in our FA with js. So just tried this and it works fine. Hope it will be good for users, if you commit it to core.</p><div class="codebox"><pre><code>window.addEventListener(&#039;click&#039;, function(e){   
  if (document.getElementById(&#039;CC&#039;).contains(e.target)){} else{
   if (cC.visible()) {
    cC.hide();
      }
  }
});</code></pre></div><p>Append this code to date_picker.js file,which actually created from ui_view.inc</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2019-01-04T18:43:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=33842#p33842</id>
		</entry>
</feed>
