Coder Social home page Coder Social logo

hossein-alipour / ha-datetimepicker Goto Github PK

View Code? Open in Web Editor NEW
36.0 36.0 8.0 635 KB

A date and time picker for Solar, Lunar and Gregorian calendars

Home Page: http://demos.hosseinalipour.ir/ha-datetimepicker/

HTML 3.76% CSS 27.54% JavaScript 68.70%

ha-datetimepicker's People

Contributors

abdian avatar hossein-alipour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

ha-datetimepicker's Issues

فایل دمو

فایل زیپ دمو به صورت زیر نمایش داده می شود
picker

Set the default datetime in javascript

Hey I am using api to get default date and I want to set it in your datetimepicker by jquery..
I tried to do this:

 var start = moment(workplaceTarget.start_date).format('L'); //returns 01/01/2019
$('#USDate').val(start); //#USDate is the datetime picker
   <input class="form-control transparent-input" type="text" id="USDate"   data-ha-datetimepicker="#USDate" name="USDate" value="@startDate" />

That's worked for the textbox value but when I try to change it by clicking the datetime picker it shows other date

Any idea?
Thanks

Nice Work

Just wanted to say . nice work man !!!

Incorrect leap years detection

Hi Hossein,
Thank for sharing this amazing date picker with us!

It seems that used algorithm to detect leap years in Solar Calendar (Persian Calendar) is incorrect.
For example, I checked years between 1300 to 1400, and your date picker shows that 1342 and 1309 are leap years, and years 1341 and 1308 are not, while it's incorrect.

webpack

سلام و تشکر از پکیج عالیتون
متاسفانه با وبپک سازگار نیست.
require('ha-datetimepicker');
ایمپورت می شود ولی کار نمیکند

تاریخ ابتدایی برای فرمت تاریخ شمسی

سلام خسته نباشید
اگه بخوایم یه تاریخی برای مقدار اولیه تنظیم کنیم چجوریه؟
هم شمسی هم میلادی
چون من برای شمسی که تست کردم قسمت ماه undifined میزنه و کمی اذیت میکنه کاربر عادی رو
2018-02-26_19-02-04

ایراد در نمایش سال ۱۴۰۳

سلام. وقت به خیر. تقویم سال ۱۴۰۳ به جای اینکه از ۴ شنبه بشه یک روز رفته جلو و از ۵ شنبه شروع میشه. تبدیل تاریخ رو میشه بررسی بفرمایید؟
ممنون

24 hour format!

Before I thank you for this useful plugin :)
Is there any option to show 24 hour format for time?

mouse wheel

Hi,
Is it possible that we have chance to change hours(by default) and minutes with mouse wheel?
Thank you 👍

مشکل با داشتن value از قبل

سلام
ممنون از پکیج عالیتون
یه مشکلی وجود داره. وقتی فیلد از قبل یک value از دیتابیس دریافت کرده باشه، یا حتی به صورت html داخل value یک تاریخ مشخص شده باشه، زمانی که روی فیلد کلیک میکنم تا تقویم رو باز کنم، صفحه مرروگر قفل میکنه و دیگه صفحه از کار میوفته.
اما اگر Value برای فیلد تنظیم نشده باشه، مشکلی وجود نداره.
ممنون میشم راهنمایی کنید

Interference with Font Awesome

The generated HTML of calendar has a class of "fa" (in case the calendar is set to solar) which interferes with font awesome classes and causes the calendar popup to not show properly.

Changing it to ".fa2" in ha-datetimepicker.js solved the issue for me.

Setting options after construction doesnt work

I've just found your (really beautiful) date picker via NuGet, which points to the demo page: http://demos.hosseinalipour.ir/ha-datetimepicker/

On that page, the section 'Change Settings' shows that you can set options after construction, but doing so doesn't work because a lot of the options are converted in the construction of the object.

For example, minAllowedDate and maxAllowedDate are converted from text to an actual Date object, and are expected to be a Date object later on during the renderDate function.

Breaks:

var hadp = new HaDateTimePicker("#datetime");
hadp.options.minAllowedDate = '2017-10-25';
hadp.show();

Works:

var hadp = new HaDateTimePicker("#datetime", {
    minAllowedDate : '2017-10-25',
});
hadp.show();

Next and Prev have issues on the last day of the month

If it's the last day of the month in a month with 31 days (like today), the next and previous buttons will not work as desired.

The problem is that in the next/prev event a new date is constructed using currentDate.getDate() - but javascript will automatically increase the month if the day is greater than the number of days in the month.

I've fixed this by changing the day to 1:

// next
var nextDate = new HaDateSource(year, month, 1); // was: currentDate.getDate()
...
// prev
self.changeDate(new HaDateSource(year, month, 1)); // was: currentDate.getDate()

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.