Siwa Posted October 29, 2020 Posted October 29, 2020 Hi autoit community. As the language used in our country is Persian (Farsi) and our calendar type is not Gregorian but instead it is Shamsi(Jalali), I want to create a custom input date, because of the difference between our calendars. For example we celebrate beginning of our new year on 20th of march, so there is much difference. So I wanted to create a custom GUI with our regional dates and I don't want to use system's default or changed calendar, the math part and the if statements is not a problem, but my main problem is that I want to create my custom selectable GUIctrldate(). Is there anyway to create my own ?
Siwa Posted October 29, 2020 Author Posted October 29, 2020 (edited) BTW, I found this html code over the net, can I embed it into my code to load this calendar and get data from this html code ? I want to use _IEBodyWriteHTML() if possible inside my code. Test.rar Edited October 29, 2020 by Siwa Uploading correct files
Siwa Posted October 29, 2020 Author Posted October 29, 2020 (edited) I did come up with this code, but it is not showing data picker. ( I did put the files at the script directory. ) expandcollapse popup#include <IE.au3> Local $oIE = _IECreate() Local $sHTML = "" $sHTML &= '<!DOCTYPE html>' & @CRLF $sHTML &= '<html>' & @CRLF $sHTML &= '<head>' & @CRLF $sHTML &= ' <title></title>' & @CRLF $sHTML &= ' <link href="http://cdn.kendostatic.com/2013.2.918/styles/kendo.common.min.css" rel="stylesheet" />' & @CRLF $sHTML &= ' <link href="http://cdn.kendostatic.com/2013.2.918/styles/kendo.default.min.css" rel="stylesheet" />' & @CRLF $sHTML &= ' <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>' & @CRLF $sHTML &= '' & @CRLF $sHTML &= '' & @CRLF $sHTML &= ' <script src="JalaliDate.js"></script>' & @CRLF $sHTML &= ' <script src="kendo.core.js"></script>' & @CRLF $sHTML &= ' <script src="kendo.calendar.js"></script>' & @CRLF $sHTML &= ' <script src="kendo.popup.js"></script>' & @CRLF $sHTML &= ' <script src="kendo.datepicker.js"></script>' & @CRLF $sHTML &= ' <script src="fa-IR.js"></script>' & @CRLF $sHTML &= '</head>' & @CRLF $sHTML &= '<body>' & @CRLF $sHTML &= ' ' & @CRLF $sHTML &= ' <div id="example" class="k-content">' & @CRLF $sHTML &= ' <div style="margin-top: -6px; margin-left: 10px">' & @CRLF $sHTML &= ' <input id="datepicker" value="1392/08/10" style="width:150px;" />' & @CRLF $sHTML &= ' </div>' & @CRLF $sHTML &= ' <script>' & @CRLF $sHTML &= ' $(document).ready(function() {' & @CRLF $sHTML &= '' & @CRLF $sHTML &= ' kendo.culture("fa-IR");' & @CRLF $sHTML &= '' & @CRLF $sHTML &= ' // create DatePicker from input HTML element' & @CRLF $sHTML &= ' $("#datepicker").kendoDatePicker();' & @CRLF $sHTML &= ' });' & @CRLF $sHTML &= ' </script>' & @CRLF $sHTML &= '' & @CRLF $sHTML &= ' </div>' & @CRLF $sHTML &= '</body>' & @CRLF $sHTML &= '</HTML>' _IEBodyWriteHTML($oIE, $sHTML) Edited October 29, 2020 by Siwa
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now