ng2-jalali-date-picker
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -35,7 +35,17 @@ "use strict"; | ||
var time = current ? current : moment(); | ||
return moment(day.format(DAY_FORMAT) + time.format(TIME_FORMAT), COMBINED_FORMAT); | ||
var parseLocale = moment.locale(); | ||
var locale = day.locale(); | ||
moment.locale(locale); | ||
var res = moment(day.format(DAY_FORMAT) + time.format(TIME_FORMAT), COMBINED_FORMAT); | ||
moment.locale(parseLocale); | ||
return res; | ||
}; | ||
DayTimeCalendarService.prototype.updateTime = function (current, time) { | ||
var day = current ? current : moment(); | ||
return moment(day.format(DAY_FORMAT) + time.format(TIME_FORMAT), COMBINED_FORMAT); | ||
var parseLocale = moment.locale(); | ||
var locale = day.locale(); | ||
moment.locale(locale); | ||
var res = moment(day.format(DAY_FORMAT) + time.format(TIME_FORMAT), COMBINED_FORMAT); | ||
moment.locale(parseLocale); | ||
return res; | ||
}; | ||
@@ -42,0 +52,0 @@ DayTimeCalendarService.decorators = [ |
{ | ||
"name": "ng2-jalali-date-picker", | ||
"author": "Mojtaba Zarei", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"license": "MIT", | ||
@@ -18,3 +18,3 @@ "main": "index.js", | ||
"build:index": "cd build-helpers && node index-maker.js", | ||
"build:prod": "node build.js && ngc && cp package.json bin && cp README.md bin", | ||
"build:prod": "node build.js && ngc && cp package.json bin && cp README.md bin && cp -R screenshots bin", | ||
"release": "npm run build:prod && npm publish bin", | ||
@@ -43,3 +43,3 @@ "pack": "cd bin && npm pack" | ||
"dependencies": { | ||
"jalali-moment": "^3.0.7" | ||
"jalali-moment": "^3.0.10" | ||
}, | ||
@@ -46,0 +46,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
532687
147
3490
Updatedjalali-moment@^3.0.10